mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
enable implicit_clone lint
This commit is contained in:
parent
b0f65913f3
commit
ebae8ceeb0
17 changed files with 24 additions and 23 deletions
|
|
@ -230,7 +230,7 @@ impl Service {
|
|||
.roomid_mutex_state
|
||||
.write()
|
||||
.await
|
||||
.entry(grapevine_room.to_owned())
|
||||
.entry(grapevine_room.clone())
|
||||
.or_default(),
|
||||
);
|
||||
|
||||
|
|
@ -1273,7 +1273,7 @@ impl Service {
|
|||
|
||||
// Set power level
|
||||
let mut users = BTreeMap::new();
|
||||
users.insert(grapevine_user.to_owned(), 100.into());
|
||||
users.insert(grapevine_user.clone(), 100.into());
|
||||
users.insert(user_id.to_owned(), 100.into());
|
||||
|
||||
services()
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ impl Service {
|
|||
Ok(Some(FileMeta {
|
||||
content_disposition,
|
||||
content_type,
|
||||
file: file.to_vec(),
|
||||
file: file.clone(),
|
||||
}))
|
||||
} else if let Ok((content_disposition, content_type, key)) =
|
||||
self.db.search_file_metadata(mxc.clone(), 0, 0)
|
||||
|
|
@ -145,7 +145,7 @@ impl Service {
|
|||
return Ok(Some(FileMeta {
|
||||
content_disposition,
|
||||
content_type,
|
||||
file: file.to_vec(),
|
||||
file: file.clone(),
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
@ -211,14 +211,14 @@ impl Service {
|
|||
Ok(Some(FileMeta {
|
||||
content_disposition,
|
||||
content_type,
|
||||
file: thumbnail_bytes.to_vec(),
|
||||
file: thumbnail_bytes.clone(),
|
||||
}))
|
||||
} else {
|
||||
// Couldn't parse file to generate thumbnail, send original
|
||||
Ok(Some(FileMeta {
|
||||
content_disposition,
|
||||
content_type,
|
||||
file: file.to_vec(),
|
||||
file: file.clone(),
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ impl Service {
|
|||
|
||||
// 1. Skip the PDU if we already have it as a timeline event
|
||||
if let Some(pdu_id) = services().rooms.timeline.get_pdu_id(event_id)? {
|
||||
return Ok(Some(pdu_id.to_vec()));
|
||||
return Ok(Some(pdu_id.clone()));
|
||||
}
|
||||
|
||||
let create_event = services()
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ impl Service {
|
|||
.roomid_spacechunk_cache
|
||||
.lock()
|
||||
.await
|
||||
.get_mut(¤t_room.to_owned())
|
||||
.get_mut(¤t_room.clone())
|
||||
.as_ref()
|
||||
{
|
||||
if let Some(cached) = cached {
|
||||
|
|
@ -202,7 +202,7 @@ impl Service {
|
|||
.send_federation_request(
|
||||
server,
|
||||
federation::space::get_hierarchy::v1::Request {
|
||||
room_id: current_room.to_owned(),
|
||||
room_id: current_room.clone(),
|
||||
suggested_only,
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1180,7 +1180,7 @@ impl Service {
|
|||
.roomid_mutex_federation
|
||||
.write()
|
||||
.await
|
||||
.entry(room_id.to_owned())
|
||||
.entry(room_id.clone())
|
||||
.or_default(),
|
||||
);
|
||||
let mutex_lock = mutex.lock().await;
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ impl Service {
|
|||
)?;
|
||||
for ((outgoing_kind, event), key) in requests.into_iter().zip(keys) {
|
||||
self.sender
|
||||
.send((outgoing_kind.to_owned(), event, key))
|
||||
.send((outgoing_kind.clone(), event, key))
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue