mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
Fix (new) clippy warnings
This commit is contained in:
parent
566cfb879b
commit
e3ad81d473
5 changed files with 10 additions and 10 deletions
|
@ -28,7 +28,7 @@ fn example_main() {
|
|||
|
||||
let mut context = gst::ParseContext::new();
|
||||
let pipeline =
|
||||
match gst::parse_launch_full(&pipeline_str, Some(&mut context), gst::ParseFlags::empty()) {
|
||||
match gst::parse_launch_full(pipeline_str, Some(&mut context), gst::ParseFlags::empty()) {
|
||||
Ok(pipeline) => pipeline,
|
||||
Err(err) => {
|
||||
if let Some(gst::ParseError::NoSuchElement) = err.kind::<gst::ParseError>() {
|
||||
|
|
|
@ -79,7 +79,7 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result<gst::Pip
|
|||
})?;
|
||||
|
||||
let caps = sample.caps().expect("Sample without caps");
|
||||
let info = gst_video::VideoInfo::from_caps(&caps).expect("Failed to parse caps");
|
||||
let info = gst_video::VideoInfo::from_caps(caps).expect("Failed to parse caps");
|
||||
|
||||
// Make sure that we only get a single buffer
|
||||
if got_snapshot {
|
||||
|
|
|
@ -20,8 +20,8 @@ const CAPS_FEATURES_VARIANT_SOME_ID: u32 = 1;
|
|||
const CAPS_FEATURES_VARIANT_SOME_STR: &str = "Some";
|
||||
|
||||
const CAPS_FEATURES_VARIANT_NAMES: &[&str] = &[
|
||||
&CAPS_FEATURES_VARIANT_ANY_STR,
|
||||
&CAPS_FEATURES_VARIANT_SOME_STR,
|
||||
CAPS_FEATURES_VARIANT_ANY_STR,
|
||||
CAPS_FEATURES_VARIANT_SOME_STR,
|
||||
];
|
||||
|
||||
struct CapsFeaturesForIterSe<'a>(&'a CapsFeaturesRef);
|
||||
|
@ -55,7 +55,7 @@ impl Serialize for CapsFeaturesRef {
|
|||
stringify!(CapsFeatures),
|
||||
CAPS_FEATURES_VARIANT_SOME_ID,
|
||||
CAPS_FEATURES_VARIANT_SOME_STR,
|
||||
&CapsFeaturesForIterSe(&self),
|
||||
&CapsFeaturesForIterSe(self),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ const CAPS_VARIANT_SOME_ID: u32 = 2;
|
|||
const CAPS_VARIANT_SOME_STR: &str = "Some";
|
||||
|
||||
const CAPS_VARIANT_NAMES: &[&str] = &[
|
||||
&CAPS_VARIANT_ANY_STR,
|
||||
&CAPS_VARIANT_EMPTY_STR,
|
||||
&CAPS_VARIANT_SOME_STR,
|
||||
CAPS_VARIANT_ANY_STR,
|
||||
CAPS_VARIANT_EMPTY_STR,
|
||||
CAPS_VARIANT_SOME_STR,
|
||||
];
|
||||
|
||||
struct CapsItemSe<'a>(&'a StructureRef, Option<&'a CapsFeaturesRef>);
|
||||
|
@ -86,7 +86,7 @@ impl Serialize for CapsRef {
|
|||
stringify!(Caps),
|
||||
CAPS_VARIANT_SOME_ID,
|
||||
CAPS_VARIANT_SOME_STR,
|
||||
&CapsForIterSe(&self),
|
||||
&CapsForIterSe(self),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ impl<'a> Serialize for TagsSer<'a> {
|
|||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut tup = serializer.serialize_tuple(2)?;
|
||||
tup.serialize_element(self.0)?;
|
||||
tup.serialize_element(&TagValuesSer::from(&self))?;
|
||||
tup.serialize_element(&TagValuesSer::from(self))?;
|
||||
tup.end()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue