mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-04-27 07:24:57 +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 {
|
enum State {
|
||||||
|
#[default]
|
||||||
Stopped,
|
Stopped,
|
||||||
Completed,
|
Completed,
|
||||||
Started(Started),
|
Started(Started),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for State {
|
|
||||||
fn default() -> State {
|
|
||||||
State::Stopped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Settings {
|
struct Settings {
|
||||||
region: Region,
|
region: Region,
|
||||||
bucket: Option<String>,
|
bucket: Option<String>,
|
||||||
|
|
|
@ -30,8 +30,10 @@ const DEFAULT_RETRY_ATTEMPTS: u32 = 5;
|
||||||
const DEFAULT_REQUEST_TIMEOUT_MSEC: u64 = 15000;
|
const DEFAULT_REQUEST_TIMEOUT_MSEC: u64 = 15000;
|
||||||
const DEFAULT_RETRY_DURATION_MSEC: u64 = 60_000;
|
const DEFAULT_RETRY_DURATION_MSEC: u64 = 60_000;
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
enum StreamingState {
|
enum StreamingState {
|
||||||
|
#[default]
|
||||||
Stopped,
|
Stopped,
|
||||||
Started {
|
Started {
|
||||||
url: GstS3Url,
|
url: GstS3Url,
|
||||||
|
@ -40,12 +42,6 @@ enum StreamingState {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for StreamingState {
|
|
||||||
fn default() -> StreamingState {
|
|
||||||
StreamingState::Stopped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Settings {
|
struct Settings {
|
||||||
url: Option<GstS3Url>,
|
url: Option<GstS3Url>,
|
||||||
access_key: Option<String>,
|
access_key: Option<String>,
|
||||||
|
|
|
@ -123,8 +123,9 @@ struct ClientContextInner {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
enum State {
|
enum State {
|
||||||
|
#[default]
|
||||||
Stopped,
|
Stopped,
|
||||||
Started {
|
Started {
|
||||||
uri: Url,
|
uri: Url,
|
||||||
|
@ -138,12 +139,6 @@ enum State {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for State {
|
|
||||||
fn default() -> Self {
|
|
||||||
State::Stopped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct ReqwestHttpSrc {
|
pub struct ReqwestHttpSrc {
|
||||||
client: Mutex<Option<ClientContext>>,
|
client: Mutex<Option<ClientContext>>,
|
||||||
|
|
|
@ -21,7 +21,9 @@ use gst_video::VideoFormat;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
enum DecoderState {
|
enum DecoderState {
|
||||||
|
#[default]
|
||||||
Stopped,
|
Stopped,
|
||||||
Started {
|
Started {
|
||||||
output_info: Option<gst_video::VideoInfo>,
|
output_info: Option<gst_video::VideoInfo>,
|
||||||
|
@ -30,12 +32,6 @@ enum DecoderState {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for DecoderState {
|
|
||||||
fn default() -> Self {
|
|
||||||
DecoderState::Stopped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Ffv1Dec {
|
pub struct Ffv1Dec {
|
||||||
state: Mutex<DecoderState>,
|
state: Mutex<DecoderState>,
|
||||||
|
|
Loading…
Reference in a new issue