diff --git a/Cargo.toml b/Cargo.toml index 26ffd0d5..bdf40ddb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ assertions_on_result_states = "warn" cloned_instead_of_copied = "warn" dbg_macro = "warn" default_union_representation = "warn" +deref_by_slicing = "warn" empty_drop = "warn" filetype_is_file = "warn" float_cmp_const = "warn" diff --git a/src/api/client_server/sync.rs b/src/api/client_server/sync.rs index 60f54e4f..0e3cc38c 100644 --- a/src/api/client_server/sync.rs +++ b/src/api/client_server/sync.rs @@ -1608,7 +1608,7 @@ pub(crate) async fn sync_events_v4_route( }) .take(5) .collect::>(); - let name = match &heroes[..] { + let name = match &*heroes { [] => None, [only] => Some(only.0.clone()), [firsts @ .., last] => Some( @@ -1622,7 +1622,7 @@ pub(crate) async fn sync_events_v4_route( ), }; - let avatar = if let [only] = &heroes[..] { + let avatar = if let [only] = &*heroes { only.1.clone() } else { None