X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-core%2Fsrc%2Freorder.rs;h=9337b9a7f232c78962aae93066e4439ecab92f41;hp=8f02afd05d06d01be9a5533e818a9900248a538a;hb=e6aaad5c5273cd814b5748b7faf3751835a37217;hpb=625751036014b099fd9c126397bc973cb0543130 diff --git a/nihav-core/src/reorder.rs b/nihav-core/src/reorder.rs index 8f02afd..9337b9a 100644 --- a/nihav-core/src/reorder.rs +++ b/nihav-core/src/reorder.rs @@ -226,6 +226,7 @@ impl MTFrameReorderer { } /// Gets the next frame to be displayed (or `None` if that is not possible). #[allow(clippy::collapsible_if)] + #[allow(clippy::collapsible_else_if)] pub fn get_frame(&mut self) -> Option { // check if we have consequent timestamps that we can output if !self.frames.is_empty() { @@ -255,7 +256,7 @@ impl MTFrameReorderer { } let end = self.ids.iter().position(|&id| id == kf_id).unwrap(); for ref_id in self.ids[..end].iter() { - if self.frames.iter().position(|(id, _)| id == ref_id).is_none() { + if !self.frames.iter().any(|(id, _)| id == ref_id) { return None; } }