mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-29 21:40:31 +00:00
Fix a couple of new 1.62 clippy warnings
This commit is contained in:
parent
5c00db62b7
commit
cb84206457
6 changed files with 13 additions and 13 deletions
|
@ -530,9 +530,7 @@ impl UdpSinkPadHandler {
|
|||
let now = element.current_running_time();
|
||||
|
||||
match running_time.into().opt_checked_sub(now) {
|
||||
Ok(Some(delay)) => {
|
||||
let _ = runtime::time::delay_for(delay.into()).await;
|
||||
}
|
||||
Ok(Some(delay)) => runtime::time::delay_for(delay.into()).await,
|
||||
_ => runtime::executor::yield_now().await,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -889,7 +889,7 @@ fn test_seek_after_ready() {
|
|||
if range == "bytes=123-" {
|
||||
let mut data_seek = vec![0; 8192 - 123];
|
||||
for (i, d) in data_seek.iter_mut().enumerate() {
|
||||
*d = (i + 123 % 256) as u8;
|
||||
*d = ((i + 123) % 256) as u8;
|
||||
}
|
||||
|
||||
Response::builder()
|
||||
|
@ -971,7 +971,7 @@ fn test_seek_after_buffer_received() {
|
|||
if range == "bytes=123-" {
|
||||
let mut data_seek = vec![0; 8192 - 123];
|
||||
for (i, d) in data_seek.iter_mut().enumerate() {
|
||||
*d = (i + 123 % 256) as u8;
|
||||
*d = ((i + 123) % 256) as u8;
|
||||
}
|
||||
|
||||
Response::builder()
|
||||
|
@ -1049,7 +1049,7 @@ fn test_seek_with_stop_position() {
|
|||
if range == "bytes=123-130" {
|
||||
let mut data_seek = vec![0; 8];
|
||||
for (i, d) in data_seek.iter_mut().enumerate() {
|
||||
*d = (i + 123 % 256) as u8;
|
||||
*d = ((i + 123) % 256) as u8;
|
||||
}
|
||||
|
||||
Response::builder()
|
||||
|
|
|
@ -344,10 +344,14 @@ impl TextAhead {
|
|||
if settings.ahead_attributes.is_empty() {
|
||||
text.push_str(&input.text);
|
||||
} else {
|
||||
text.push_str(&format!(
|
||||
use std::fmt::Write;
|
||||
|
||||
write!(
|
||||
&mut text,
|
||||
"<span {}>{}</span>",
|
||||
settings.ahead_attributes, input.text
|
||||
));
|
||||
settings.ahead_attributes, input.text,
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2100,7 +2100,7 @@ impl FallbackSrc {
|
|||
fallback_input.call_async(|fallback_input| {
|
||||
// Re-run video fallback input with videotestsrc
|
||||
let _ = fallback_input.set_state(gst::State::Null);
|
||||
let _ = fallback_input.set_property("uri", None::<&str>);
|
||||
fallback_input.set_property("uri", None::<&str>);
|
||||
let _ = fallback_input.sync_state_with_parent();
|
||||
});
|
||||
|
||||
|
|
|
@ -628,8 +628,6 @@ impl FallbackSwitch {
|
|||
state.first = false;
|
||||
}
|
||||
|
||||
drop(pad_settings);
|
||||
|
||||
if switch_to_pad {
|
||||
state.timed_out = false;
|
||||
self.set_active_pad(&mut state, pad);
|
||||
|
|
|
@ -69,7 +69,7 @@ impl StreamsTopology {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> From<gst::StreamCollection> for StreamsTopology {
|
||||
impl From<gst::StreamCollection> for StreamsTopology {
|
||||
fn from(collection: gst::StreamCollection) -> Self {
|
||||
let (mut audio, mut video, mut text) = (0, 0, 0);
|
||||
for stream in collection.iter() {
|
||||
|
|
Loading…
Reference in a new issue