automated clippy fixes

This commit is contained in:
Scott Lamb
2025-01-22 09:40:25 -08:00
parent 865328f02d
commit c46832369a
6 changed files with 9 additions and 15 deletions

View File

@@ -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,

View File

@@ -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",