aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/char.rs
diff options
context:
space:
mode:
authorLibravatar pinkforest(she/her) <36498018+pinkforest@users.noreply.github.com>2023-02-10 22:29:28 +1100
committerLibravatar GitHub <noreply@github.com>2023-02-10 12:29:28 +0100
commit72a8cf99fbd20ab29f4f3c1845c67898cdaff7de (patch)
tree5adc51e05d48bbf5785c4828a9aea8e91794f0f2 /src/util/char.rs
parent4483d25511704a16756e09698854ef1648a0a77b (diff)
downloadmarkdown-rs-72a8cf99fbd20ab29f4f3c1845c67898cdaff7de.tar.gz
markdown-rs-72a8cf99fbd20ab29f4f3c1845c67898cdaff7de.tar.bz2
markdown-rs-72a8cf99fbd20ab29f4f3c1845c67898cdaff7de.zip
Move `log` to optional dependencies
Closes GH-48.
Diffstat (limited to 'src/util/char.rs')
-rw-r--r--src/util/char.rs2
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),