From 48c1bf7d192cc5d2e423eb3036cc172297fc8dc3 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Wed, 12 Jan 2022 16:21:14 +0100 Subject: `&Option` → `Option<&T>` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- askama_shared/src/generator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'askama_shared/src') diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 72e2270..437331c 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -15,7 +15,7 @@ use std::{cmp, hash, mem, str}; pub fn generate( input: &TemplateInput<'_>, contexts: &HashMap<&PathBuf, Context<'_>, S>, - heritage: &Option>, + heritage: Option<&Heritage<'_>>, integrations: Integrations, ) -> Result { Generator::new(input, contexts, heritage, integrations, MapChain::new()) @@ -28,7 +28,7 @@ struct Generator<'a, S: std::hash::BuildHasher> { // All contexts, keyed by the package-relative template path contexts: &'a HashMap<&'a PathBuf, Context<'a>, S>, // The heritage contains references to blocks and their ancestry - heritage: &'a Option>, + heritage: Option<&'a Heritage<'a>>, // What integrations need to be generated integrations: Integrations, // Variables accessible directly from the current scope (not redirected to context) @@ -52,7 +52,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { fn new<'n>( input: &'n TemplateInput<'_>, contexts: &'n HashMap<&'n PathBuf, Context<'n>, S>, - heritage: &'n Option>, + heritage: Option<&'n Heritage<'_>>, integrations: Integrations, locals: MapChain<'n, &'n str, LocalMeta>, ) -> Generator<'n, S> { -- cgit