diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-02-08 14:57:27 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-02-08 14:57:27 +0100 |
commit | 5d86086f557b72c37a5b50a891bc543b96ae2deb (patch) | |
tree | 13d52cc56cad7e557a477ef4ea675c9c35dc9b85 /askama_shared | |
parent | f123d4eee00323628ae32b1f9b01318402b729fa (diff) | |
download | askama-5d86086f557b72c37a5b50a891bc543b96ae2deb.tar.gz askama-5d86086f557b72c37a5b50a891bc543b96ae2deb.tar.bz2 askama-5d86086f557b72c37a5b50a891bc543b96ae2deb.zip |
Adapt to new warnings and formatting
Diffstat (limited to 'askama_shared')
-rw-r--r-- | askama_shared/src/filters/mod.rs | 2 | ||||
-rw-r--r-- | askama_shared/src/generator.rs | 2 | ||||
-rw-r--r-- | askama_shared/src/input.rs | 1 | ||||
-rw-r--r-- | askama_shared/src/lib.rs | 2 |
4 files changed, 1 insertions, 6 deletions
diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs index bcc70be..e790a7f 100644 --- a/askama_shared/src/filters/mod.rs +++ b/askama_shared/src/filters/mod.rs @@ -348,7 +348,7 @@ mod tests { fn test_trim() { assert_eq!(trim(&" Hello\tworld\t").unwrap(), "Hello\tworld"); } - + #[test] fn test_truncate() { assert_eq!(truncate(&"hello", &2).unwrap(), "he..."); diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index dd33e12..59df687 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -14,8 +14,6 @@ use std::collections::{HashMap, HashSet}; use std::path::PathBuf; use std::{cmp, hash, mem, str}; -use syn; - pub fn generate<S: std::hash::BuildHasher>( input: &TemplateInput, contexts: &HashMap<&PathBuf, Context, S>, diff --git a/askama_shared/src/input.rs b/askama_shared/src/input.rs index 53718f0..f9d10a4 100644 --- a/askama_shared/src/input.rs +++ b/askama_shared/src/input.rs @@ -3,7 +3,6 @@ use crate::{Config, Syntax}; use std::path::PathBuf; use quote::ToTokens; -use syn; pub struct TemplateInput<'a> { pub ast: &'a syn::DeriveInput, diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 0e8664d..e405439 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -7,8 +7,6 @@ use std::path::{Path, PathBuf}; #[cfg(feature = "serde")] use serde::Deserialize; -#[cfg(feature = "config")] -use toml; pub use askama_escape::MarkupDisplay; |