mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-27 13:00:57 +00:00
escape: simplify literals as suggested by clippy
This commit is contained in:
parent
539debd690
commit
c96fd996bb
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user