diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-12 16:28:22 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-12 16:57:48 +0100 |
commit | cb1b28f8f49854adbb6467c392f72509fb8d436f (patch) | |
tree | 1247a01c1ddefa545c057baa92c16d71558c6f82 | |
parent | 48c1bf7d192cc5d2e423eb3036cc172297fc8dc3 (diff) | |
download | askama-cb1b28f8f49854adbb6467c392f72509fb8d436f.tar.gz askama-cb1b28f8f49854adbb6467c392f72509fb8d436f.tar.bz2 askama-cb1b28f8f49854adbb6467c392f72509fb8d436f.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/heritage.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |