diff --git a/src/location.rs b/src/location.rs index 0823ef0..6d6bd9a 100644 --- a/src/location.rs +++ b/src/location.rs @@ -2,7 +2,7 @@ pub struct Location<'a> { /// The module path where the message was genereated. - /// [::]* + /// [`::`]* module_path: &'a str, /// The name of the file where the message was generated. diff --git a/src/macros.rs b/src/macros.rs index 2585e99..7f898a5 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -52,6 +52,8 @@ macro_rules! log /// Logs a message at the Error severity Level. /// /// This is for a serious, program stopping, problem. +/// +/// This will panic. #[macro_export] macro_rules! error { @@ -113,7 +115,8 @@ macro_rules! debug { (domain: $domain_name: expr, $($arg: tt)*) => ({ - if cfg!(debug_assertions) == true + // Only log this if we are currently in a debug build. + if cfg!(debug_assertions) { $crate::log!(domain: $domain_name, $crate::Levels::Debug, $($arg)*); } @@ -122,7 +125,7 @@ macro_rules! debug ($($arg: tt)*) => ({ // Only log this if we are currently in a debug build. - if cfg!(debug_assertions) == true + if cfg!(debug_assertions) { $crate::log!($crate::Levels::Debug, $($arg)*); }