Skip to content

Commit

Permalink
Fix rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-Janggun committed Jun 26, 2023
1 parent ab6779f commit 5222738
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions homework/src/art/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl NodeHeader {
///
/// Returns `Ok(header)` if a new header is created; `Err(())` if the key is not fit for a
/// header.
pub fn new(key: &[u8]) -> Result<Self, ()> {
pub(crate) fn new(key: &[u8]) -> Result<Self, ()> {
let length = key.len();
if length > Self::MAX_LENGTH {
return Err(());
Expand All @@ -128,7 +128,7 @@ impl NodeHeader {
}

/// Shrinks the key by `delta`.
pub fn shrink_key(&mut self, delta: u8) {
pub(crate) fn shrink_key(&mut self, delta: u8) {
for i in delta..self.length {
self.key[usize::from(i - delta)] = self.key[usize::from(i)];
}
Expand All @@ -137,13 +137,13 @@ impl NodeHeader {

/// Returns the length of the given header's key.
#[inline]
pub fn length(&self) -> u8 {
pub(crate) fn length(&self) -> u8 {
self.length
}

/// Returns the key of the given header.
#[inline]
pub fn key(&self) -> &[u8] {
pub(crate) fn key(&self) -> &[u8] {
&self.key[0..usize::from(self.length)]
}
}
Expand Down

0 comments on commit 5222738

Please sign in to comment.