mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Can avoid needing .ok()
This commit is contained in:
parent
0687229a1a
commit
626e00bb56
|
@ -28,15 +28,11 @@ pub fn include_wav(input: TokenStream) -> TokenStream {
|
|||
|
||||
let out_file_path = Path::new(&out_dir).with_file_name(&out_filename);
|
||||
|
||||
let out_file_mtime = fs::metadata(&out_file_path)
|
||||
.and_then(|metadata| metadata.modified())
|
||||
.ok();
|
||||
let in_file_mtime = fs::metadata(&path)
|
||||
.and_then(|metadata| metadata.modified())
|
||||
.ok();
|
||||
let out_file_mtime = fs::metadata(&out_file_path).and_then(|metadata| metadata.modified());
|
||||
let in_file_mtime = fs::metadata(&path).and_then(|metadata| metadata.modified());
|
||||
|
||||
let should_write = match (out_file_mtime, in_file_mtime) {
|
||||
(Some(out_file_mtime), Some(in_file_mtime)) => out_file_mtime <= in_file_mtime,
|
||||
(Ok(out_file_mtime), Ok(in_file_mtime)) => out_file_mtime <= in_file_mtime,
|
||||
_ => true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue