Skip to content

Commit

Permalink
style: fix dead_code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Feb 26, 2024
1 parent 14823b4 commit 21def52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ impl<T> Pointer for *mut T {
}

/// A trait for adding some helper routines to raw bytes.
#[cfg(test)]
pub(crate) trait Byte {
/// Converts this byte to a `char` if it's ASCII. Otherwise panics.
fn to_char(self) -> char;
}

#[cfg(test)]
impl Byte for u8 {
fn to_char(self) -> char {
assert!(self.is_ascii());
Expand Down

0 comments on commit 21def52

Please sign in to comment.