Skip to content

Conversation

daxpedda
Copy link
Contributor

.chain_update(adrs.compressed());
m.iter().for_each(|x| sha.update(x.as_slice()));
m.iter()
.for_each(|x| Update::update(&mut sha, x.as_slice()));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hitting the same problem as usual. This time really unclear how to avoid it without loosing access to all the QoL methods of Digest.

Comment on lines +23 to +26
pub trait HashDigest {
/// The associated `Digest` type.
type Digest: Update;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally had type Digest on HashSuite directly, but that made it publicly not accessible.

So I introduced HashDigest just to make it publicly accessible if users ever need to access the type.

@daxpedda
Copy link
Contributor Author

@tarcieri, follow-up from RustCrypto/traits#2011.
Would the same issue apply here with different messages being produced by the closure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant