mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-05 15:22:29 -05:00
automated clippy fixes
This commit is contained in:
@@ -376,7 +376,7 @@ struct SignalDayValue<'a> {
|
||||
pub states: &'a [u64],
|
||||
}
|
||||
|
||||
impl<'a> TopLevel<'a> {
|
||||
impl TopLevel<'_> {
|
||||
/// Serializes cameras as a list (rather than a map), optionally including the `days` and
|
||||
/// `cameras` fields.
|
||||
fn serialize_cameras<S>(
|
||||
@@ -440,7 +440,7 @@ pub struct ListRecordings<'a> {
|
||||
pub video_sample_entries: (&'a db::LockedDatabase, Vec<i32>),
|
||||
}
|
||||
|
||||
impl<'a> ListRecordings<'a> {
|
||||
impl ListRecordings<'_> {
|
||||
fn serialize_video_sample_entries<S>(
|
||||
video_sample_entries: &(&db::LockedDatabase, Vec<i32>),
|
||||
serializer: S,
|
||||
|
||||
@@ -129,10 +129,7 @@ impl<'a> StaticFileRequest<'a> {
|
||||
p => (p, true),
|
||||
};
|
||||
|
||||
let last_dot = match path.rfind('.') {
|
||||
None => return None,
|
||||
Some(d) => d,
|
||||
};
|
||||
let last_dot = path.rfind('.')?;
|
||||
let ext = &path[last_dot + 1..];
|
||||
let mime = match ext {
|
||||
"css" => "text/css",
|
||||
|
||||
Reference in New Issue
Block a user