Skip to content

Commit

Permalink
Apply suggestions from clippy 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Sep 6, 2024
1 parent 43d8e75 commit 1ff04c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions askama/benches/to-json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ fn functions(c: &mut Criterion) {
fn escape_json(b: &mut criterion::Bencher<'_>) {
b.iter(|| {
for &s in STRINGS {
format!("{}", json(s).unwrap());
let _ = format!("{}", json(s).unwrap());
}
});
}

fn escape_json_for_html(b: &mut criterion::Bencher<'_>) {
b.iter(|| {
for &s in STRINGS {
format!("{}", MarkupDisplay::new_unsafe(json(s).unwrap(), Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(json(s).unwrap(), Html));
}
});
}
Expand Down
10 changes: 5 additions & 5 deletions askama_escape/benches/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ quis lacus at, gravida maximus elit. Duis tristique, nisl nullam.
"#;

b.iter(|| {
format!("{}", MarkupDisplay::new_unsafe(string_long, Html));
format!("{}", MarkupDisplay::new_unsafe(string_short, Html));
format!("{}", MarkupDisplay::new_unsafe(empty, Html));
format!("{}", MarkupDisplay::new_unsafe(no_escape, Html));
format!("{}", MarkupDisplay::new_unsafe(no_escape_long, Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(string_long, Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(string_short, Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(empty, Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(no_escape, Html));
let _ = format!("{}", MarkupDisplay::new_unsafe(no_escape_long, Html));
});
}

0 comments on commit 1ff04c6

Please sign in to comment.