mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 00:31: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
|
|
@ -191,7 +191,7 @@ lasttimelinecount_cache: {lasttimelinecount_cache}\n"
|
|||
self.global.insert(b"keypair", &keypair)?;
|
||||
Ok::<_, Error>(keypair)
|
||||
},
|
||||
|s| Ok(s.to_vec()),
|
||||
|s| Ok(s.clone()),
|
||||
)?;
|
||||
|
||||
let mut parts = keypair_bytes.splitn(2, |&b| b == 0xff);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ impl service::rooms::alias::Data for KeyValueDatabase {
|
|||
|
||||
fn remove_alias(&self, alias: &RoomAliasId) -> Result<()> {
|
||||
if let Some(room_id) = self.alias_roomid.get(alias.alias().as_bytes())? {
|
||||
let mut prefix = room_id.to_vec();
|
||||
let mut prefix = room_id.clone();
|
||||
prefix.push(0xff);
|
||||
|
||||
for (key, _) in self.aliasid_alias.scan_prefix(prefix) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ impl service::rooms::state::Data for KeyValueDatabase {
|
|||
}
|
||||
|
||||
for event_id in event_ids {
|
||||
let mut key = prefix.to_owned();
|
||||
let mut key = prefix.clone();
|
||||
key.extend_from_slice(event_id.as_bytes());
|
||||
self.roomid_pduleaves.insert(&key, event_id.as_bytes())?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue