We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df31abe commit e88f753Copy full SHA for e88f753
vm/src/stdlib/hashlib.rs
@@ -106,10 +106,9 @@ fn hashlib_new(
106
other => Err(vm.new_value_error(format!("Unknown hashing algorithm: {}", other))),
107
}?;
108
109
- match data {
110
- OptionalArg::Present(data) => hasher.update(data, vm).map(|_| ())?,
111
- OptionalArg::Missing => (),
112
- };
+ if let OptionalArg::Present(data) = data {
+ hasher.update(data, vm)?;
+ }
113
114
Ok(hasher)
115
}
0 commit comments