diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-12-03 17:06:58 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-12-03 17:08:19 -0500 |
| commit | 0ad3dce83a4506875e6b1381f5261e458b5c5d98 (patch) | |
| tree | e8b9b7cb2feed9babe16ca19bdc667e49c861a52 /compiler/rustc_serialize/src/json.rs | |
| parent | b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18 (diff) | |
| download | rust-0ad3dce83a4506875e6b1381f5261e458b5c5d98.tar.gz rust-0ad3dce83a4506875e6b1381f5261e458b5c5d98.zip | |
Fix some clippy lints
Diffstat (limited to 'compiler/rustc_serialize/src/json.rs')
| -rw-r--r-- | compiler/rustc_serialize/src/json.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_serialize/src/json.rs b/compiler/rustc_serialize/src/json.rs index 6c8965aa2e3..bbbe568f17a 100644 --- a/compiler/rustc_serialize/src/json.rs +++ b/compiler/rustc_serialize/src/json.rs @@ -1859,7 +1859,7 @@ impl<T: Iterator<Item = char>> Parser<T> { } let n2 = self.decode_hex_escape()?; - if n2 < 0xDC00 || n2 > 0xDFFF { + if !(0xDC00..=0xDFFF).contains(&n2) { return self.error(LoneLeadingSurrogateInHexEscape); } let c = |
