getChan commented on code in PR #19539:
URL: https://github.com/apache/datafusion/pull/19539#discussion_r2650313555
##########
datafusion/functions/src/crypto/basic.rs:
##########
@@ -173,26 +173,14 @@ macro_rules! digest_to_array {
($METHOD:ident, $INPUT:expr) => {{
let binary_array: BinaryArray = $INPUT
.iter()
- .map(|x| {
- x.map(|x| {
- let mut digest = $METHOD::default();
- digest.update(x);
- digest.finalize()
- })
- })
+ .map(|x| x.map(|x| $METHOD::digest(x)))
Review Comment:
same code as before.
```rust
#[inline]
fn digest(data: impl AsRef<[u8]>) -> Output<Self> {
let mut hasher = Self::default();
hasher.update(data.as_ref());
hasher.finalize()
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]