more clippy fixes
This commit is contained in:
parent
88b4ea8fb6
commit
5c454551da
27 changed files with 140 additions and 184 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue