Fix some clippy warnings (#536)
This commit is contained in:
committed by
Dan Gohman
parent
ef1cbfdaa8
commit
3206461502
@@ -39,11 +39,13 @@ lazy_static! {
|
||||
.map_err(|_| warn!("Failed to get metadata of current executable"))
|
||||
.ok()
|
||||
})
|
||||
.map(|mtime| match mtime.duration_since(std::time::UNIX_EPOCH) {
|
||||
Ok(duration) => format!("{}", duration.as_millis()),
|
||||
Err(err) => format!("m{}", err.duration().as_millis()),
|
||||
})
|
||||
.unwrap_or_else(|| "no-mtime".to_string())
|
||||
.map_or_else(
|
||||
|| "no-mtime".to_string(),
|
||||
|mtime| match mtime.duration_since(std::time::UNIX_EPOCH) {
|
||||
Ok(duration) => format!("{}", duration.as_millis()),
|
||||
Err(err) => format!("m{}", err.duration().as_millis()),
|
||||
},
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(clippy::new_without_default, clippy::new_without_default_derive)
|
||||
allow(clippy::new_without_default, clippy::new_without_default)
|
||||
)]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
|
||||
Reference in New Issue
Block a user