remove dead code

This commit is contained in:
klensy 2024-04-12 17:54:35 +03:00
parent ab71ee7a92
commit aff5f47dce

View file

@ -1,8 +1,3 @@
use rustc_data_structures::sync::Lock;
use std::fmt::Debug;
use std::time::{Duration, Instant};
#[cfg(test)]
mod tests;
@ -26,31 +21,6 @@ pub fn to_readable_str(mut val: usize) -> String {
groups.join("_")
}
pub fn record_time<T, F>(accu: &Lock<Duration>, f: F) -> T
where
F: FnOnce() -> T,
{
let start = Instant::now();
let rv = f();
let duration = start.elapsed();
let mut accu = accu.lock();
*accu += duration;
rv
}
pub fn indent<R, F>(op: F) -> R
where
R: Debug,
F: FnOnce() -> R,
{
// Use in conjunction with the log post-processor like `src/etc/indenter`
// to make debug output more readable.
debug!(">>");
let r = op();
debug!("<< (Result = {:?})", r);
r
}
pub struct Indenter {
_cannot_construct_outside_of_this_module: (),
}