scale-generator: Combine two adjacent `if` conditions into one
Clippy suggested:
warning: this if statement can be collapsed
= help: for further information visit
@@ -206,13 +206,11 @@ pub mod note {
pub fn canonicalize(&self, lean: Accidental) -> Note {
let mut n: Note = Semitone::from(*self).into();
if let Some(accidental) = n.accidental {
- if accidental != lean {
- if lean == Accidental::Flat {
+ if accidental != lean && lean == Accidental::Flat {
n += Interval::HalfStep;
n.accidental = Some(Accidental::Flat);
}
}
- }
n
}
}
