mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-03 18:29:04 +00:00
apply clippy suggestions
This commit is contained in:
parent
5e9d9853e7
commit
e00297d1c7
4 changed files with 26 additions and 26 deletions
|
@ -128,10 +128,10 @@ pub enum Constant {
|
|||
|
||||
impl Constant {
|
||||
pub fn is_true(self) -> bool {
|
||||
self.bool().map_or(false, |b| b)
|
||||
self.bool().is_some_and(|b| b)
|
||||
}
|
||||
pub fn is_false(self) -> bool {
|
||||
self.bool().map_or(false, |b| !b)
|
||||
self.bool().is_some_and(|b| !b)
|
||||
}
|
||||
pub fn complex(self) -> Option<(f64, f64)> {
|
||||
match self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue