Remove unneeded clones
This commit is contained in:
parent
859ec7babe
commit
26068c462d
@ -10,7 +10,7 @@ pub type DeviceId = String;
|
|||||||
|
|
||||||
/// Generates a random `DeviceId`, suitable for assignment to a new device.
|
/// Generates a random `DeviceId`, suitable for assignment to a new device.
|
||||||
pub fn generate() -> DeviceId {
|
pub fn generate() -> DeviceId {
|
||||||
generate_localpart(8).to_string()
|
generate_localpart(8)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -131,7 +131,7 @@ impl<'a> TryFrom<&'a str> for UserId {
|
|||||||
Ok(Self {
|
Ok(Self {
|
||||||
hostname: host,
|
hostname: host,
|
||||||
port,
|
port,
|
||||||
localpart: downcased_localpart.to_owned(),
|
localpart: downcased_localpart,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user