mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:25:42 +02:00
Rust 1.49 Clippy Fixes (#2835)
This commit is contained in:
@ -243,7 +243,7 @@ where
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
if chf == b'-' || chf >= b'0' && chf <= b'9' {
|
||||
if chf == b'-' || (b'0'..=b'9').contains(&chf) {
|
||||
let mut pn = ParseNumber::new(self.str_buf.iter().cloned());
|
||||
match pn.parse(false) {
|
||||
Ok(Number::F64(v)) => {
|
||||
@ -435,7 +435,7 @@ where
|
||||
|
||||
let n2 = self.decode_hex_escape()?;
|
||||
|
||||
if n2 < 0xDC00 || n2 > 0xDFFF {
|
||||
if !(0xDC00..=0xDFFF).contains(&n2) {
|
||||
return Err(self
|
||||
.rdr
|
||||
.error(ErrorCode::LoneLeadingSurrogateInHexEscape));
|
||||
|
@ -107,7 +107,7 @@ impl Value {
|
||||
}
|
||||
s.parse().ok()
|
||||
}
|
||||
if pointer == "" {
|
||||
if pointer.is_empty() {
|
||||
return Some(self);
|
||||
}
|
||||
if !pointer.starts_with('/') {
|
||||
|
Reference in New Issue
Block a user