Skip to content

Commit

Permalink
cargo linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dnut committed Apr 10, 2023
1 parent a85ccf5 commit 431ea39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ macro_rules! sensitive {
}
pub(crate) use sensitive;

#[allow(unused)]
macro_rules! trace {
($($arg:tt)*) => {
if *crate::log::level::get() >= crate::log::Level::Trace {
crate::log::_log!(println, "TRACE", $($arg)*)
}
};
}
#[allow(unused)]
pub(crate) use trace;

macro_rules! debug {
Expand Down Expand Up @@ -128,7 +130,7 @@ pub fn truncate(s: &str, max_chars: usize) -> &str {
}

pub fn concise_numbers(ns: &[u8]) -> String {
if ns.len() == 0 {
if ns.is_empty() {
return "[]".to_string();
}
if ns.len() == 1 {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ fn total_pain(now: SystemTime, errors: Vec<SystemTime>) -> f64 {
/// Looks at a painful event and determines how much of its pain is left.
/// calculated as exponential decay with a half-life of 1 minute.
fn remaining_pain(seconds_ago: u64) -> f64 {
E.powf(-(seconds_ago as f64) / 86.5617024533378044416)
E.powf(-(seconds_ago as f64) / 86.561_702_453_337_8)
}

0 comments on commit 431ea39

Please sign in to comment.