enable deref_by_slicing lint

This commit is contained in:
Charles Hall 2024-05-12 16:23:04 -07:00
parent 71c48f66c4
commit 885fc8428c
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 3 additions and 2 deletions

View file

@ -1608,7 +1608,7 @@ pub(crate) async fn sync_events_v4_route(
})
.take(5)
.collect::<Vec<_>>();
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