Skip to content

Commit

Permalink
feat: make common_prefix a public API
Browse files Browse the repository at this point in the history
  • Loading branch information
bochaco committed Apr 9, 2024
1 parent f319b91 commit 2e5d376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl XorName {

/// Returns the length of the common prefix with the `other` name; e. g.
/// the when `other = 11110000` and `self = 11111111` this is 4.
fn common_prefix(&self, other: &Self) -> usize {
pub fn common_prefix(&self, other: &Self) -> usize {
for byte_index in 0..XOR_NAME_LEN {
if self[byte_index] != other[byte_index] {
return (byte_index * 8)
Expand Down

0 comments on commit 2e5d376

Please sign in to comment.