Skip to content

Commit 21def52

Browse files
committed
style: fix dead_code lint
1 parent 14823b4 commit 21def52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ext.rs

+2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ impl<T> Pointer for *mut T {
3939
}
4040

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

48+
#[cfg(test)]
4749
impl Byte for u8 {
4850
fn to_char(self) -> char {
4951
assert!(self.is_ascii());

0 commit comments

Comments
 (0)