mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-01 15:00:57 +00:00
Update formatting
This commit is contained in:
parent
5b9c3ca4ac
commit
0efd48e037
@ -77,10 +77,7 @@ pub fn escape<E>(string: &str, escaper: E) -> Escaped<'_, E>
|
||||
where
|
||||
E: Escaper,
|
||||
{
|
||||
Escaped {
|
||||
string,
|
||||
escaper,
|
||||
}
|
||||
Escaped { string, escaper }
|
||||
}
|
||||
|
||||
pub struct Escaped<'a, E>
|
||||
|
@ -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()),
|
||||
]
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user