fix compilation warnings on rust v1.83

This commit is contained in:
Eric B. Ridge
2025-01-09 13:45:45 -05:00
committed by Stu Hood
parent 91db6909d1
commit 1f2c2d0c8a
2 changed files with 11 additions and 0 deletions

View File

@@ -68,6 +68,16 @@ impl SegmentId {
self.0.as_simple().to_string()
}
/// Returns the bytes of a segment uuid
pub fn uuid_bytes(&self) -> &[u8; 16] {
self.0.as_bytes()
}
/// Returns only the first four bytes of a segment uuid
pub fn short_uuid_bytes(&self) -> &[u8] {
&self.0.as_bytes()[0..4]
}
/// Build a `SegmentId` string from the full uuid string.
///
/// E.g. "a5c4dfcbdfe645089129e308e26d5523"

View File

@@ -114,6 +114,7 @@ impl SegmentManager {
}
/// Deletes all empty segments
#[allow(dead_code)]
fn remove_empty_segments(&self) {
let mut registers_lock = self.write();
registers_lock