mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
clippy: Prefer if let Some(_) over Option::map
This commit is contained in:
12
src/cue.rs
12
src/cue.rs
@@ -344,9 +344,15 @@ impl Cue {
|
|||||||
(Vec::<RawCue>::new(), Vec::<RawAdtlMember>::new()),
|
(Vec::<RawCue>::new(), Vec::<RawAdtlMember>::new()),
|
||||||
|(mut cues, mut adtls), (cue, label, note, ltxt)| {
|
|(mut cues, mut adtls), (cue, label, note, ltxt)| {
|
||||||
cues.push(cue);
|
cues.push(cue);
|
||||||
label.map(|l| adtls.push(RawAdtlMember::Label(l)));
|
if let Some(l) = label {
|
||||||
note.map(|n| adtls.push(RawAdtlMember::Note(n)));
|
adtls.push(RawAdtlMember::Label(l))
|
||||||
ltxt.map(|m| adtls.push(RawAdtlMember::LabeledText(m)));
|
}
|
||||||
|
if let Some(n) = note {
|
||||||
|
adtls.push(RawAdtlMember::Note(n))
|
||||||
|
}
|
||||||
|
if let Some(m) = ltxt {
|
||||||
|
adtls.push(RawAdtlMember::LabeledText(m))
|
||||||
|
}
|
||||||
(cues, adtls)
|
(cues, adtls)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user