diff --git a/abstutil/Cargo.toml b/abstutil/Cargo.toml index f6c79036c8..56f804de68 100644 --- a/abstutil/Cargo.toml +++ b/abstutil/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" [dependencies] bincode = "1.1.2" -lazy_static = "1.3.0" num_cpus = "1.10.0" rand = "0.7.0" rand_xorshift = "0.2.0" diff --git a/abstutil/src/lib.rs b/abstutil/src/lib.rs index 6ecd616c69..2c033ec5b9 100644 --- a/abstutil/src/lib.rs +++ b/abstutil/src/lib.rs @@ -3,7 +3,6 @@ mod collections; mod error; mod io; mod logs; -mod notes; mod random; mod time; @@ -19,7 +18,6 @@ pub use crate::io::{ FileWithProgress, }; pub use crate::logs::Warn; -pub use crate::notes::note; pub use crate::random::{fork_rng, WeightedUsizeChoice}; pub use crate::time::{ elapsed_seconds, prettyprint_usize, MeasureMemory, Profiler, Timer, TimerSink, diff --git a/abstutil/src/notes.rs b/abstutil/src/notes.rs deleted file mode 100644 index 18908e3873..0000000000 --- a/abstutil/src/notes.rs +++ /dev/null @@ -1,23 +0,0 @@ -use lazy_static::lazy_static; -use std::sync::Mutex; - -// TODO Maybe just use Timer. - -lazy_static! { - static ref NOTES: Mutex> = Mutex::new(Vec::new()); -} - -pub fn note(msg: String) { - NOTES.lock().unwrap().push(msg); -} - -pub fn dump_notes() { - let mut notes = NOTES.lock().unwrap(); - - // TODO log or println? - for msg in notes.iter() { - println!("{}", msg); - } - - notes.clear(); -} diff --git a/abstutil/src/time.rs b/abstutil/src/time.rs index 4b334728ad..593b419c09 100644 --- a/abstutil/src/time.rs +++ b/abstutil/src/time.rs @@ -1,4 +1,4 @@ -use crate::{notes, PROGRESS_FREQUENCY_SECONDS}; +use crate::PROGRESS_FREQUENCY_SECONDS; use std::collections::HashMap; use std::fs::File; use std::io::{stdout, BufReader, Error, Read, Write}; @@ -386,7 +386,6 @@ impl<'a> std::ops::Drop for Timer<'a> { } self.println(String::new()); } - notes::dump_notes(); if !self.warnings.is_empty() { self.println(format!("{} warnings:", self.warnings.len()));