forked from mirrors/gstreamer-rs
gstreamer/query: Fix clippy::single_match
This commit is contained in:
parent
56c2b730f8
commit
513cf47447
1 changed files with 5 additions and 11 deletions
|
@ -1412,20 +1412,14 @@ mod tests {
|
||||||
assert!(query.is_writable());
|
assert!(query.is_writable());
|
||||||
|
|
||||||
let query = query.make_mut();
|
let query = query.make_mut();
|
||||||
match query.view_mut() {
|
if let QueryView::Duration(d) = &mut query.view_mut() {
|
||||||
QueryView::Duration(ref mut d) => {
|
|
||||||
d.set(2 * crate::SECOND);
|
d.set(2 * crate::SECOND);
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
|
|
||||||
match query.view() {
|
if let QueryView::Duration(d) = &query.view() {
|
||||||
QueryView::Duration(ref d) => {
|
|
||||||
let duration = d.get_result();
|
let duration = d.get_result();
|
||||||
assert_eq!(duration.try_into(), Ok(2 * crate::SECOND));
|
assert_eq!(duration.try_into(), Ok(2 * crate::SECOND));
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue