mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
woops, fix timer API change
This commit is contained in:
parent
8a1ee5c32b
commit
60246dc7f1
@ -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
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user