Use is_none()
Clippy emits: warning: binary comparison to literal `Option::None` As suggested, use `find.is_none()` instead of comparison with `None`.
This commit is contained in:
parent
d192052519
commit
3966709336
|
@ -165,7 +165,7 @@ impl core::str::FromStr for OutPoint {
|
||||||
return Err(ParseOutPointError::TooLong);
|
return Err(ParseOutPointError::TooLong);
|
||||||
}
|
}
|
||||||
let find = s.find(':');
|
let find = s.find(':');
|
||||||
if find == None || find != s.rfind(':') {
|
if find.is_none() || find != s.rfind(':') {
|
||||||
return Err(ParseOutPointError::Format);
|
return Err(ParseOutPointError::Format);
|
||||||
}
|
}
|
||||||
let colon = find.unwrap();
|
let colon = find.unwrap();
|
||||||
|
|
Loading…
Reference in New Issue