Skip to content

Commit

Permalink
Unrolled build for rust-lang#117940
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#117940 - zhiqiangxu:remove_redundant_drop, r=thomcc

chore: remove unnecessary drop

 No need to manually drop since it's implicit.
  • Loading branch information
rust-timer authored Nov 24, 2023
2 parents 8abf920 + a355df4 commit 92b0527
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 92b0527

Please sign in to comment.