diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-07-24 23:01:04 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-07-25 22:55:55 +0200 |
commit | 0efd48e037f54957ba577dfc871753a7e2d28038 (patch) | |
tree | 59241be42afe850c12dcf410a057f8a2a64f048e /askama_shared | |
parent | 5b9c3ca4acb701ea5e5f2431e3ee20057137d8fe (diff) | |
download | askama-0efd48e037f54957ba577dfc871753a7e2d28038.tar.gz askama-0efd48e037f54957ba577dfc871753a7e2d28038.tar.bz2 askama-0efd48e037f54957ba577dfc871753a7e2d28038.zip |
Update formatting
Diffstat (limited to 'askama_shared')
-rw-r--r-- | askama_shared/src/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 918e356..71543fc 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -55,7 +55,10 @@ impl<'a> Config<'a> { for raw_s in raw_syntaxes { let name = raw_s.name; - if syntaxes.insert(name.to_string(), Syntax::from(raw_s)).is_some() { + if syntaxes + .insert(name.to_string(), Syntax::from(raw_s)) + .is_some() + { panic!("syntax \"{}\" is already defined", name) } } @@ -404,7 +407,10 @@ mod tests { vec![ (str_set(&["js"]), "::askama::Js".into()), (str_set(&["html", "htm", "xml"]), "::askama::Html".into()), - (str_set(&["md", "none", "txt", "yml", ""]), "::askama::Text".into()), + ( + str_set(&["md", "none", "txt", "yml", ""]), + "::askama::Text".into() + ), (str_set(&["j2", "jinja", "jinja2"]), "::askama::Html".into()), ] ); |