Skip to content

Commit

Permalink
Even more final docs :)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Dec 19, 2024
1 parent 36ab8cc commit 1aed111
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/dht/src/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ pub fn combine_op_hashes<
out
}

/// Combine a hash into an existing, mutable hash.
///
/// This is intended to be used for incrementally updating an existing combined hash. That makes it
/// an alternative to [combine_op_hashes] when it is possible to avoid loading all the existing
/// hashes and computing a new combined hash that includes this incoming hash.
pub fn combine_hashes(into: &mut bytes::BytesMut, other: bytes::Bytes) {
// Properly initialise the target from the source if the target is empty.
// Otherwise, the loop below would run 0 times.
Expand Down

0 comments on commit 1aed111

Please sign in to comment.