Skip to content

Commit

Permalink
Remove log feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Dec 11, 2023
1 parent 736ac94 commit ff3fe80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include = [
# For documentation of features see the `mio::features` module.
[features]
# By default Mio only provides a shell implementation.
default = ["log"]
default = []

# Enables the `Poll` and `Registry` types.
os-poll = []
Expand All @@ -45,7 +45,7 @@ os-ext = [
net = []

[dependencies]
log = { version = "0.4.8", optional = true }
log = { version = "0.4.8" }

[target.'cfg(unix)'.dependencies]
libc = "0.2.149"
Expand Down
28 changes: 0 additions & 28 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,3 @@ macro_rules! cfg_any_os_ext {
)*
}
}

macro_rules! trace {
($($t:tt)*) => {
log!(trace, $($t)*)
}
}

macro_rules! warn {
($($t:tt)*) => {
log!(warn, $($t)*)
}
}

macro_rules! error {
($($t:tt)*) => {
log!(error, $($t)*)
}
}

macro_rules! log {
($level: ident, $($t:tt)*) => {
#[cfg(feature = "log")]
{ log::$level!($($t)*) }
// Silence unused variables warnings.
#[cfg(not(feature = "log"))]
{ if false { let _ = ( $($t)* ); } }
}
}

0 comments on commit ff3fe80

Please sign in to comment.