]> git.lizzy.rs Git - rust.git/commit
Move directly when Rc/Arc::make_mut splits from Weak
authorJosh Stone <jistone@redhat.com>
Tue, 12 Jan 2021 01:32:21 +0000 (17:32 -0800)
committerJosh Stone <jistone@redhat.com>
Tue, 12 Jan 2021 01:46:49 +0000 (17:46 -0800)
commitf89f30fb2cabe7883ead5777980f75088455efb6
tree62dcf018ba910de29c289f9f53b87e758a926a45
parentd85df44e8d54f92a23d8734cb05d14c75697a2ca
Move directly when Rc/Arc::make_mut splits from Weak

When only other `Weak` references remain, we can directly move the data
into the new unique allocation as a plain memory copy.
library/alloc/src/rc.rs
library/alloc/src/sync.rs