Skip to content

Commit de20a3b

Browse files
committed
value: inline single-use private from_bits function
1 parent e025850 commit de20a3b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/value.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,8 @@ impl Iterator for CompactBitsIter<'_> {
817817
}
818818

819819
impl Value {
820-
fn from_bits<I: Iterator<Item = u8>>(
820+
/// Decode a value of the given type from its compact bit encoding.
821+
pub fn from_compact_bits<I: Iterator<Item = u8>>(
821822
bits: &mut BitIter<I>,
822823
ty: &Final,
823824
) -> Result<Self, EarlyEndOfStreamError> {
@@ -872,14 +873,6 @@ impl Value {
872873
Ok(result_stack.pop().unwrap())
873874
}
874875

875-
/// Decode a value of the given type from its compact bit encoding.
876-
pub fn from_compact_bits<I: Iterator<Item = u8>>(
877-
bits: &mut BitIter<I>,
878-
ty: &Final,
879-
) -> Result<Self, EarlyEndOfStreamError> {
880-
Self::from_bits(bits, ty)
881-
}
882-
883876
/// Decode a value of the given type from its padded bit encoding.
884877
pub fn from_padded_bits<I: Iterator<Item = u8>>(
885878
bits: &mut BitIter<I>,

0 commit comments

Comments
 (0)