Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-maron committed Dec 15, 2023
1 parent 8c805b7 commit 0f95a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/hotshot/src/traits/networking/web_server_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<TYPES: NodeType> WebCommChannel<TYPES> {

/// # Note
///
/// This function uses `DefaultHasher` instead of cryptographic hash functions like SHA-256 because `DefaultHasher` can hash a value directly from a reference, while SHA-256 requires owning the value or copying/cloning it.
/// This function uses `DefaultHasher` instead of cryptographic hash functions like SHA-256 because of an `AsRef` requirement.
fn hash<T: Hash>(t: &T) -> u64 {
let mut s = DefaultHasher::new();
t.hash(&mut s);
Expand Down

0 comments on commit 0f95a6e

Please sign in to comment.