diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-24 08:23:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-24 08:23:52 +0100 |
| commit | f38de06ce603100faf1c0b35b818efa12cf1c7cc (patch) | |
| tree | 28f58b8242bad122be8bef7a6c1ea9e235d94234 | |
| parent | 7e3ec1b0e25915fb16ae43223752a25d50e3ce0f (diff) | |
| parent | a355df44320f516547cd1e715ff9ea694256c978 (diff) | |
Rollup merge of #117940 - zhiqiangxu:remove_redundant_drop, r=thomcc
chore: remove unnecessary drop No need to manually drop since it's implicit.
| -rw-r--r-- | library/core/src/cell.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 0978b3c9280..f10a82c5694 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -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. |
