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 @@ pub const fn new(value: T) -> Cell<T> {
|
||||
#[inline]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn set(&self, val: T) {
|
||||
let old = self.replace(val);
|
||||
drop(old);
|
||||
self.replace(val);
|
||||
}
|
||||
|
||||
/// Swaps the values of two `Cell`s.
|
||||
|
Loading…
Reference in New Issue
Block a user