From 72a8cf99fbd20ab29f4f3c1845c67898cdaff7de Mon Sep 17 00:00:00 2001 From: "pinkforest(she/her)" <36498018+pinkforest@users.noreply.github.com> Date: Fri, 10 Feb 2023 22:29:28 +1100 Subject: Move `log` to optional dependencies Closes GH-48. --- src/util/char.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util') 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) -> String { } /// Format an optional `byte` (`none` means eof). +#[cfg(feature = "log")] pub fn format_byte_opt(byte: Option) -> 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), -- cgit