Skip to content

Commit

Permalink
Make new_with_key non-public
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Dec 2, 2020
1 parent 50192e1 commit ad010af
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/storage/src/pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ where
}
}

/// Creates a new packed value.
pub fn new_with_key(value: T, key: Key) -> Self {
Self {
inner: value,
key: Some(key),
}
}

/// Returns a shared reference to the packed value.
pub fn as_inner(pack: &Pack<T>) -> &T {
&pack.inner
Expand All @@ -134,6 +126,14 @@ where
pub fn as_inner_mut(pack: &mut Pack<T>) -> &mut T {
&mut pack.inner
}

/// Creates a new packed value with a `key`.
fn new_with_key(value: T, key: Key) -> Self {
Self {
inner: value,
key: Some(key),
}
}
}

impl<T> Drop for Pack<T>
Expand Down

0 comments on commit ad010af

Please sign in to comment.