mirror of
https://github.com/Zenithsiz/zbuild.git
synced 2026-02-03 22:23:53 +00:00
Fixed panic when target file was already built.
This commit is contained in:
parent
f2a7a51439
commit
4c0e3cfe18
@ -88,7 +88,7 @@ use {
|
||||
collections::HashMap,
|
||||
env,
|
||||
path::{Path, PathBuf},
|
||||
time::SystemTime,
|
||||
time::{Duration, SystemTime},
|
||||
},
|
||||
tokio::fs,
|
||||
watcher::Watcher,
|
||||
@ -245,7 +245,7 @@ async fn build_target<T: BuildableTargetInner + std::fmt::Display>(
|
||||
let build_duration = build_res
|
||||
.build_time
|
||||
.duration_since(build_start_time)
|
||||
.expect("Build time was negative");
|
||||
.unwrap_or(Duration::ZERO);
|
||||
tracing::info!("Built target {target} in {build_duration:.2?}");
|
||||
},
|
||||
Err(err) => tracing::error!("Unable to build target {target}: {:?}", anyhow::Error::new(err)),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user