about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-07 20:04:54 +0000
committerbors <bors@rust-lang.org>2021-11-07 20:04:54 +0000
commit46b8e7488eae116722196e8390c1bd2ea2e396cf (patch)
tree4d9b19012744e2bcb59dd6d2c61be9ebcebc12b6 /compiler/rustc_data_structures/src
parent68568dcb8ff49a3d70f4cc2d9215b5753d088738 (diff)
parent5c454551dae45563e7a33da7142377cf7d8dbcbf (diff)
downloadrust-46b8e7488eae116722196e8390c1bd2ea2e396cf.tar.gz
rust-46b8e7488eae116722196e8390c1bd2ea2e396cf.zip
Auto merge of #90668 - matthiaskrgr:clippy_nov7, r=jyn514
more clippy fixes
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/steal.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/steal.rs b/compiler/rustc_data_structures/src/steal.rs
index a1ffbae8b15..a3ece655047 100644
--- a/compiler/rustc_data_structures/src/steal.rs
+++ b/compiler/rustc_data_structures/src/steal.rs
@@ -34,7 +34,7 @@ impl<T> Steal<T> {
     #[track_caller]
     pub fn borrow(&self) -> MappedReadGuard<'_, T> {
         let borrow = self.value.borrow();
-        if let None = &*borrow {
+        if borrow.is_none() {
             panic!("attempted to read from stolen value: {}", std::any::type_name::<T>());
         }
         ReadGuard::map(borrow, |opt| opt.as_ref().unwrap())