mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable deref_by_slicing lint
This commit is contained in:
parent
71c48f66c4
commit
885fc8428c
2 changed files with 3 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ assertions_on_result_states = "warn"
|
||||||
cloned_instead_of_copied = "warn"
|
cloned_instead_of_copied = "warn"
|
||||||
dbg_macro = "warn"
|
dbg_macro = "warn"
|
||||||
default_union_representation = "warn"
|
default_union_representation = "warn"
|
||||||
|
deref_by_slicing = "warn"
|
||||||
empty_drop = "warn"
|
empty_drop = "warn"
|
||||||
filetype_is_file = "warn"
|
filetype_is_file = "warn"
|
||||||
float_cmp_const = "warn"
|
float_cmp_const = "warn"
|
||||||
|
|
|
||||||
|
|
@ -1608,7 +1608,7 @@ pub(crate) async fn sync_events_v4_route(
|
||||||
})
|
})
|
||||||
.take(5)
|
.take(5)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let name = match &heroes[..] {
|
let name = match &*heroes {
|
||||||
[] => None,
|
[] => None,
|
||||||
[only] => Some(only.0.clone()),
|
[only] => Some(only.0.clone()),
|
||||||
[firsts @ .., last] => Some(
|
[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()
|
only.1.clone()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue