mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 06:50:59 +00:00
Fix a few new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1120>
This commit is contained in:
parent
93503c0ca9
commit
3ef8a48ded
4 changed files with 8 additions and 25 deletions
|
@ -84,18 +84,14 @@ impl Started {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum State {
|
||||
#[default]
|
||||
Stopped,
|
||||
Completed,
|
||||
Started(Started),
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
State::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
struct Settings {
|
||||
region: Region,
|
||||
bucket: Option<String>,
|
||||
|
|
|
@ -30,8 +30,10 @@ const DEFAULT_RETRY_ATTEMPTS: u32 = 5;
|
|||
const DEFAULT_REQUEST_TIMEOUT_MSEC: u64 = 15000;
|
||||
const DEFAULT_RETRY_DURATION_MSEC: u64 = 60_000;
|
||||
|
||||
#[derive(Default)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum StreamingState {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started {
|
||||
url: GstS3Url,
|
||||
|
@ -40,12 +42,6 @@ enum StreamingState {
|
|||
},
|
||||
}
|
||||
|
||||
impl Default for StreamingState {
|
||||
fn default() -> StreamingState {
|
||||
StreamingState::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
struct Settings {
|
||||
url: Option<GstS3Url>,
|
||||
access_key: Option<String>,
|
||||
|
|
|
@ -123,8 +123,9 @@ struct ClientContextInner {
|
|||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
enum State {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started {
|
||||
uri: Url,
|
||||
|
@ -138,12 +139,6 @@ enum State {
|
|||
},
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> Self {
|
||||
State::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ReqwestHttpSrc {
|
||||
client: Mutex<Option<ClientContext>>,
|
||||
|
|
|
@ -21,7 +21,9 @@ use gst_video::VideoFormat;
|
|||
use once_cell::sync::Lazy;
|
||||
use std::sync::Mutex;
|
||||
|
||||
#[derive(Default)]
|
||||
enum DecoderState {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started {
|
||||
output_info: Option<gst_video::VideoInfo>,
|
||||
|
@ -30,12 +32,6 @@ enum DecoderState {
|
|||
},
|
||||
}
|
||||
|
||||
impl Default for DecoderState {
|
||||
fn default() -> Self {
|
||||
DecoderState::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Ffv1Dec {
|
||||
state: Mutex<DecoderState>,
|
||||
|
|
Loading…
Reference in a new issue