diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index d8d464e19..1363a2620 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -426,16 +426,12 @@ mod tests { } { - let metas = buffer.iter_meta::().collect::>(); - assert_eq!(metas.len(), 1); + let metas = buffer.iter_meta::(); + assert_eq!(metas.count(), 1); } { - let metas = buffer - .get_mut() - .unwrap() - .iter_meta_mut::() - .collect::>(); - assert_eq!(metas.len(), 1); + let metas = buffer.get_mut().unwrap().iter_meta_mut::(); + assert_eq!(metas.count(), 1); } { let metas = buffer.iter_meta::().collect::>(); @@ -469,28 +465,23 @@ mod tests { } { - let metas = buffer.iter_meta::().collect::>(); - assert_eq!(metas.len(), 0); + let metas = buffer.iter_meta::(); + assert_eq!(metas.count(), 0); + } + { + let metas = buffer.get_mut().unwrap().iter_meta_mut::(); + assert_eq!(metas.count(), 0); + } + { + let metas = buffer.iter_meta::(); + assert_eq!(metas.count(), 0); } { let metas = buffer .get_mut() .unwrap() - .iter_meta_mut::() - .collect::>(); - assert_eq!(metas.len(), 0); - } - { - let metas = buffer.iter_meta::().collect::>(); - assert_eq!(metas.len(), 0); - } - { - let metas = buffer - .get_mut() - .unwrap() - .iter_meta_mut::() - .collect::>(); - assert_eq!(metas.len(), 0); + .iter_meta_mut::(); + assert_eq!(metas.count(), 0); } assert!(buffer.get_meta::().is_none());