diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-05 19:30:38 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-06 13:05:24 +0100 |
commit | f4254dedcfcfce4000abc91b4860c36d3fb91430 (patch) | |
tree | 80203d049336d625ccfcc11cfc9102031e1ce140 /askama_shared | |
parent | 697f92dc273ed82da8012216079361853c2457f2 (diff) | |
download | askama-f4254dedcfcfce4000abc91b4860c36d3fb91430.tar.gz askama-f4254dedcfcfce4000abc91b4860c36d3fb91430.tar.bz2 askama-f4254dedcfcfce4000abc91b4860c36d3fb91430.zip |
Omit implicit lifetimes
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/generator.rs | 2 | ||||
-rw-r--r-- | askama_shared/src/heritage.rs | 4 | ||||
-rw-r--r-- | askama_shared/src/input.rs | 2 | ||||
-rw-r--r-- | askama_shared/src/lib.rs | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index ad413ea..8b1fb33 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -1680,7 +1680,7 @@ impl LocalMeta { // type SetChain<'a, T> = MapChain<'a, T, ()>; #[derive(Debug)] -struct MapChain<'a, K: 'a, V: 'a> +struct MapChain<'a, K, V> where K: cmp::Eq + hash::Hash, { diff --git a/askama_shared/src/heritage.rs b/askama_shared/src/heritage.rs index a0b5460..95057b8 100644 --- a/askama_shared/src/heritage.rs +++ b/askama_shared/src/heritage.rs @@ -9,7 +9,7 @@ pub struct Heritage<'a> { pub blocks: BlockAncestry<'a>, } -impl<'a> Heritage<'a> { +impl Heritage<'_> { pub fn new<'n>( mut ctx: &'n Context<'n>, contexts: &'n HashMap<&'n PathBuf, Context<'n>>, @@ -41,7 +41,7 @@ pub struct Context<'a> { pub imports: HashMap<&'a str, PathBuf>, } -impl<'a> Context<'a> { +impl Context<'_> { pub fn new<'n>( config: &Config<'_>, path: &Path, diff --git a/askama_shared/src/input.rs b/askama_shared/src/input.rs index 30340b5..03c62d0 100644 --- a/askama_shared/src/input.rs +++ b/askama_shared/src/input.rs @@ -17,7 +17,7 @@ pub struct TemplateInput<'a> { pub path: PathBuf, } -impl<'a> TemplateInput<'a> { +impl TemplateInput<'_> { /// Extract the template metadata from the `DeriveInput` structure. This /// mostly recovers the data for the `TemplateInput` fields from the /// `template()` attribute list fields; it also finds the of the `_parent` diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 8d64e7b..2800ffe 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -32,7 +32,7 @@ pub struct Config<'a> { pub escapers: Vec<(HashSet<String>, String)>, } -impl<'a> Config<'a> { +impl Config<'_> { pub fn new(s: &str) -> std::result::Result<Config<'_>, CompileError> { let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); let default_dirs = vec![root.join("templates")]; @@ -138,7 +138,7 @@ pub struct Syntax<'a> { pub comment_end: &'a str, } -impl<'a> Default for Syntax<'a> { +impl Default for Syntax<'_> { fn default() -> Self { Self { block_start: "{%", @@ -198,7 +198,7 @@ struct RawConfig<'d> { escaper: Option<Vec<RawEscaper<'d>>>, } -impl<'d> RawConfig<'d> { +impl RawConfig<'_> { #[cfg(feature = "config")] fn from_toml_str(s: &str) -> std::result::Result<RawConfig<'_>, CompileError> { toml::from_str(s).map_err(|e| { |