Remove unneeded clones

This commit is contained in:
Jonas Platte 2019-10-31 22:33:12 +01:00
parent 859ec7babe
commit 26068c462d
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ pub type DeviceId = String;
/// Generates a random `DeviceId`, suitable for assignment to a new device.
pub fn generate() -> DeviceId {
generate_localpart(8).to_string()
generate_localpart(8)
}
#[cfg(test)]

View File

@ -131,7 +131,7 @@ impl<'a> TryFrom<&'a str> for UserId {
Ok(Self {
hostname: host,
port,
localpart: downcased_localpart.to_owned(),
localpart: downcased_localpart,
})
}
}