mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Auto-format: cargo fmt --all
This commit is contained in:
1 parent
5dfeee25bb
commit
15555d42e7
1 file changed
+2
-3
@@ -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