Skip to content

Commit

Permalink
parse_owned_byte_slice -> parse_owned_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Nov 13, 2024
1 parent 9f6bf45 commit e36bd3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/zerovec/src/cow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<'a, V: VarULE + ?Sized> VarZeroCow<'a, V> {
}

/// Construct from an owned slice. Errors if the slice doesn't represent a valid `V`
pub fn parse_owned_byte_slice(bytes: Box<[u8]>) -> Result<Self, UleError> {
pub fn parse_owned_bytes(bytes: Box<[u8]>) -> Result<Self, UleError> {
V::validate_byte_slice(&bytes)?;
let bytes = ManuallyDrop::new(bytes);
let buf: NonNull<[u8]> = (&**bytes).into();
Expand Down

0 comments on commit e36bd3e

Please sign in to comment.