mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-21 19:45:11 +00:00
Use unwrap_or_else
in build.rs
This commit is contained in:
parent
cd715a6e00
commit
af267ba638
2
build.rs
2
build.rs
@ -41,7 +41,7 @@ fn main() -> io::Result<()> {
|
||||
let path = &out.join("version_string.txt");
|
||||
|
||||
// Bland version text
|
||||
let mut f = File::create(path).expect(&path.to_string_lossy());
|
||||
let mut f = File::create(path).unwrap_or_else(|_| { panic!("{}", path.to_string_lossy().to_string()) });
|
||||
writeln!(f, "{}", strip_codes(&ver))?;
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user