From 2e5d376c95708e24a7e7fdb0ed16adf383cd036b Mon Sep 17 00:00:00 2001 From: bochaco Date: Tue, 9 Apr 2024 11:25:55 -0300 Subject: [PATCH] feat: make common_prefix a public API --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1279f5bd..f97b9198 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)