woops, fix timer API change

This commit is contained in:
Dustin Carlino 2018-10-30 15:44:38 -07:00
parent 8a1ee5c32b
commit 60246dc7f1
3 changed files with 5 additions and 5 deletions

View File

@ -79,13 +79,13 @@ struct TimerSpan {
}
impl Timer {
pub fn new(name: String) -> Timer {
pub fn new(name: &str) -> Timer {
let mut t = Timer {
results: Vec::new(),
stack: Vec::new(),
outermost_name: name.clone(),
outermost_name: name.to_string(),
};
t.start(&name);
t.start(name);
t
}

View File

@ -7,7 +7,7 @@ use structopt::StructOpt;
fn main() {
let flags = Flags::from_args();
let mut timer = abstutil::Timer::new(format!("generate {}", flags.output));
let mut timer = abstutil::Timer::new(&format!("generate {}", flags.output));
let map = convert(&flags, &mut timer);
println!("writing to {}", flags.output);
timer.start("saving map");

View File

@ -15,7 +15,7 @@ fn main() {
log::set_logger(&LOG_ADAPTER).unwrap();
let flags = SimFlags::from_args();
let mut timer = Timer::new(format!(
let mut timer = Timer::new(&format!(
"precompute {} with {}",
flags.load, flags.edits_name
));