Skip to content

Commit

Permalink
escape: simplify literals as suggested by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Aug 25, 2023
1 parent 539debd commit 4e2ca8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions askama_escape/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ impl std::io::Write for JsonEscapeBuffer {
let mut last = 0;
for (index, byte) in bytes.iter().enumerate() {
let escaped = match byte {
b'&' => Some(br#"\u0026"#),
b'\'' => Some(br#"\u0027"#),
b'<' => Some(br#"\u003c"#),
b'>' => Some(br#"\u003e"#),
b'&' => Some(br"\u0026"),
b'\'' => Some(br"\u0027"),
b'<' => Some(br"\u003c"),
b'>' => Some(br"\u003e"),
_ => None,
};
if let Some(escaped) = escaped {
Expand Down

0 comments on commit 4e2ca8e

Please sign in to comment.