Rollup merge of #117940 - zhiqiangxu:remove_redundant_drop, r=thomcc
chore: remove unnecessary drop No need to manually drop since it's implicit.
This commit is contained in:
commit
f38de06ce6
@ -409,8 +409,7 @@ impl<T> Cell<T> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn set(&self, val: T) {
|
pub fn set(&self, val: T) {
|
||||||
let old = self.replace(val);
|
self.replace(val);
|
||||||
drop(old);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Swaps the values of two `Cell`s.
|
/// Swaps the values of two `Cell`s.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user