Skip to content

Commit bca1d81

Browse files
committed
Add docs fix err msgs
1 parent 492dfc2 commit bca1d81

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ pub fn take_array<const N: usize>(
514514
) -> std::result::Result<([u8; N], &[u8]), EncodingError> {
515515
let Some((out, rest)) = buffer.split_first_chunk::<N>() else {
516516
return Err(EncodingError::out_of_bounds(&format!(
517-
"Could not write [{}] bytes to buffer of length [{}]",
517+
"Could not take [{}] bytes from buffer of length [{}]",
518518
N,
519519
buffer.len()
520520
)));
@@ -717,7 +717,8 @@ fn encode_u64(val: u64, buffer: &mut [u8]) -> Result<&mut [u8], EncodingError> {
717717
write_array(&val.to_le_bytes(), buffer)
718718
}
719719

720-
fn encode_usize_var<'a>(
720+
/// Encode a `usize` in a variable width way
721+
pub fn encode_usize_var<'a>(
721722
value: &usize,
722723
buffer: &'a mut [u8],
723724
) -> Result<&'a mut [u8], EncodingError> {

0 commit comments

Comments
 (0)