mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
replace unwrap_or with unwrap_or_else
This commit is contained in:
@@ -390,7 +390,8 @@ where
|
||||
obj.downcast()
|
||||
.map_err(|obj| pyref_payload_error(vm, class, obj))
|
||||
} else {
|
||||
T::special_retrieve(vm, obj.clone()).unwrap_or(Err(pyref_type_error(vm, class, obj)))
|
||||
T::special_retrieve(vm, obj.clone())
|
||||
.unwrap_or_else(|| Err(pyref_type_error(vm, class, obj)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user