mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Auto-format: cargo fmt --all
This commit is contained in:
@@ -701,9 +701,8 @@ pub mod _hashlib {
|
||||
if len < 1 {
|
||||
return Err(vm.new_value_error("key length must be greater than 0.".to_owned()));
|
||||
}
|
||||
usize::try_from(len).map_err(|_| {
|
||||
vm.new_overflow_error("key length is too great.".to_owned())
|
||||
})?
|
||||
usize::try_from(len)
|
||||
.map_err(|_| vm.new_overflow_error("key length is too great.".to_owned()))?
|
||||
}
|
||||
None => hash_digest_size(&name).ok_or_else(|| unsupported_hash(&name, vm))?,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user