mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
remove unnecessary drop
This commit is contained in:
parent
1500db7314
commit
a355df4432
@ -409,8 +409,7 @@ impl<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