resolve nightly performance assigning_clones lint
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
4dfd5a7c15
commit
aedb5966fe
5 changed files with 10 additions and 10 deletions
|
@ -186,11 +186,11 @@ impl Service {
|
|||
|
||||
let mut device = Device::new(pusher.ids.app_id.clone(), pusher.ids.pushkey.clone());
|
||||
device.data.default_payload = http.default_payload.clone();
|
||||
device.data.format = http.format.clone();
|
||||
device.data.format.clone_from(&http.format);
|
||||
|
||||
// Tweaks are only added if the format is NOT event_id_only
|
||||
if !event_id_only {
|
||||
device.tweaks = tweaks.clone();
|
||||
device.tweaks.clone_from(&tweaks);
|
||||
}
|
||||
|
||||
let d = vec![device];
|
||||
|
|
|
@ -69,10 +69,10 @@ impl Service {
|
|||
for (list_id, list) in &mut request.lists {
|
||||
if let Some(cached_list) = cached.lists.get(list_id) {
|
||||
if list.sort.is_empty() {
|
||||
list.sort = cached_list.sort.clone();
|
||||
list.sort.clone_from(&cached_list.sort);
|
||||
};
|
||||
if list.room_details.required_state.is_empty() {
|
||||
list.room_details.required_state = cached_list.room_details.required_state.clone();
|
||||
list.room_details.required_state.clone_from(&cached_list.room_details.required_state);
|
||||
};
|
||||
list.room_details.timeline_limit =
|
||||
list.room_details.timeline_limit.or(cached_list.room_details.timeline_limit);
|
||||
|
@ -106,7 +106,7 @@ impl Service {
|
|||
(..) => {},
|
||||
}
|
||||
if list.bump_event_types.is_empty() {
|
||||
list.bump_event_types = cached_list.bump_event_types.clone();
|
||||
list.bump_event_types.clone_from(&cached_list.bump_event_types);
|
||||
};
|
||||
}
|
||||
cached.lists.insert(list_id.clone(), list.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue