From cb1b28f8f49854adbb6467c392f72509fb8d436f Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Wed, 12 Jan 2022 16:28:22 +0100 Subject: Add template argument for contexts' hasher In askama_shared::generate a custom hasher for the contexts can be given, so Heritage needs to accept the argument to. --- askama_shared/src/heritage.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_shared') diff --git a/askama_shared/src/heritage.rs b/askama_shared/src/heritage.rs index 95057b8..12d16d0 100644 --- a/askama_shared/src/heritage.rs +++ b/askama_shared/src/heritage.rs @@ -10,9 +10,9 @@ pub struct Heritage<'a> { } impl Heritage<'_> { - pub fn new<'n>( + pub fn new<'n, S: std::hash::BuildHasher>( mut ctx: &'n Context<'n>, - contexts: &'n HashMap<&'n PathBuf, Context<'n>>, + contexts: &'n HashMap<&'n PathBuf, Context<'n>, S>, ) -> Heritage<'n> { let mut blocks: BlockAncestry<'n> = ctx .blocks -- cgit