remove unnecessary drop
This commit is contained in:
parent
1500db7314
commit
a355df4432
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue