mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
refactore: use clone_from() (#5451)
`a.clone_from(&b)` is equivalent to `a = b.clone()` in functionality, but can be overridden to reuse the resources of a to avoid unnecessary allocations.
This commit is contained in:
@@ -784,7 +784,7 @@ pub(crate) async fn maybe_do_aeap_transition(
|
||||
.await?;
|
||||
|
||||
let old_addr = mem::take(&mut peerstate.addr);
|
||||
peerstate.addr = info.from.clone();
|
||||
peerstate.addr.clone_from(&info.from);
|
||||
let header = info.autocrypt_header.as_ref().context(
|
||||
"Internal error: Tried to do an AEAP transition without an autocrypt header??",
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user