diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/char.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/char.rs b/src/util/char.rs index 79cd32e..3ea4500 100644 --- a/src/util/char.rs +++ b/src/util/char.rs @@ -115,6 +115,7 @@ pub fn format_opt(char: Option<char>) -> String { } /// Format an optional `byte` (`none` means eof). +#[cfg(feature = "log")] pub fn format_byte_opt(byte: Option<u8>) -> String { byte.map_or("end of file".into(), |byte| { format!("byte {}", format_byte(byte)) @@ -191,6 +192,7 @@ mod tests { } #[test] + #[cfg(feature = "log")] fn test_format_byte_opt() { assert_eq!( format_byte_opt(None), |