Skip to content

Commit

Permalink
Remove target_pointer_width = 8 because it is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
Sympatron authored Dec 6, 2024
1 parent ba97093 commit b72402c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions core/src/vusize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,6 @@ pub fn encoded_len(value: usize) -> usize {
}
}

/// Get the length of an encoded `usize` for the given value in bytes.
#[cfg(target_pointer_width = "8")]
pub fn encoded_len(value: usize) -> usize {
// I don't think you can have targets with 8 bit pointers in rust,
// but just in case, 0..=127 would fit in one byte, and 128..=255
// would fit in two.
if (value & 0x80) == 0x80 {
2
} else {
1
}
}

/// Encode the given usize to the `slice`, using `length` bytes for encoding.
///
/// ## Safety
Expand Down

0 comments on commit b72402c

Please sign in to comment.