mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 23:35:07 +00:00
Omit implicit lifetimes
This commit is contained in:
parent
697f92dc27
commit
f4254dedcf
@ -72,7 +72,7 @@ pub struct EscapeWriter<'a, E, W> {
|
|||||||
escaper: &'a E,
|
escaper: &'a E,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, E, W> Write for EscapeWriter<'a, E, W>
|
impl<E, W> Write for EscapeWriter<'_, E, W>
|
||||||
where
|
where
|
||||||
W: Write,
|
W: Write,
|
||||||
E: Escaper,
|
E: Escaper,
|
||||||
@ -98,7 +98,7 @@ where
|
|||||||
escaper: E,
|
escaper: E,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, E> Display for Escaped<'a, E>
|
impl<E> Display for Escaped<'_, E>
|
||||||
where
|
where
|
||||||
E: Escaper,
|
E: Escaper,
|
||||||
{
|
{
|
||||||
|
@ -1680,7 +1680,7 @@ impl LocalMeta {
|
|||||||
// type SetChain<'a, T> = MapChain<'a, T, ()>;
|
// type SetChain<'a, T> = MapChain<'a, T, ()>;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct MapChain<'a, K: 'a, V: 'a>
|
struct MapChain<'a, K, V>
|
||||||
where
|
where
|
||||||
K: cmp::Eq + hash::Hash,
|
K: cmp::Eq + hash::Hash,
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ pub struct Heritage<'a> {
|
|||||||
pub blocks: BlockAncestry<'a>,
|
pub blocks: BlockAncestry<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Heritage<'a> {
|
impl Heritage<'_> {
|
||||||
pub fn new<'n>(
|
pub fn new<'n>(
|
||||||
mut ctx: &'n Context<'n>,
|
mut ctx: &'n Context<'n>,
|
||||||
contexts: &'n HashMap<&'n PathBuf, Context<'n>>,
|
contexts: &'n HashMap<&'n PathBuf, Context<'n>>,
|
||||||
@ -41,7 +41,7 @@ pub struct Context<'a> {
|
|||||||
pub imports: HashMap<&'a str, PathBuf>,
|
pub imports: HashMap<&'a str, PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Context<'a> {
|
impl Context<'_> {
|
||||||
pub fn new<'n>(
|
pub fn new<'n>(
|
||||||
config: &Config<'_>,
|
config: &Config<'_>,
|
||||||
path: &Path,
|
path: &Path,
|
||||||
|
@ -17,7 +17,7 @@ pub struct TemplateInput<'a> {
|
|||||||
pub path: PathBuf,
|
pub path: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> TemplateInput<'a> {
|
impl TemplateInput<'_> {
|
||||||
/// Extract the template metadata from the `DeriveInput` structure. This
|
/// Extract the template metadata from the `DeriveInput` structure. This
|
||||||
/// mostly recovers the data for the `TemplateInput` fields from the
|
/// mostly recovers the data for the `TemplateInput` fields from the
|
||||||
/// `template()` attribute list fields; it also finds the of the `_parent`
|
/// `template()` attribute list fields; it also finds the of the `_parent`
|
||||||
|
@ -32,7 +32,7 @@ pub struct Config<'a> {
|
|||||||
pub escapers: Vec<(HashSet<String>, String)>,
|
pub escapers: Vec<(HashSet<String>, String)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Config<'a> {
|
impl Config<'_> {
|
||||||
pub fn new(s: &str) -> std::result::Result<Config<'_>, CompileError> {
|
pub fn new(s: &str) -> std::result::Result<Config<'_>, CompileError> {
|
||||||
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
||||||
let default_dirs = vec![root.join("templates")];
|
let default_dirs = vec![root.join("templates")];
|
||||||
@ -138,7 +138,7 @@ pub struct Syntax<'a> {
|
|||||||
pub comment_end: &'a str,
|
pub comment_end: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for Syntax<'a> {
|
impl Default for Syntax<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
block_start: "{%",
|
block_start: "{%",
|
||||||
@ -198,7 +198,7 @@ struct RawConfig<'d> {
|
|||||||
escaper: Option<Vec<RawEscaper<'d>>>,
|
escaper: Option<Vec<RawEscaper<'d>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> RawConfig<'d> {
|
impl RawConfig<'_> {
|
||||||
#[cfg(feature = "config")]
|
#[cfg(feature = "config")]
|
||||||
fn from_toml_str(s: &str) -> std::result::Result<RawConfig<'_>, CompileError> {
|
fn from_toml_str(s: &str) -> std::result::Result<RawConfig<'_>, CompileError> {
|
||||||
toml::from_str(s).map_err(|e| {
|
toml::from_str(s).map_err(|e| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user