chore: eliminate unwraps

This commit is contained in:
Shunsuke Shibayama 2024-03-25 13:31:32 +09:00
parent 11f2b48853
commit 56f06a0a1e
14 changed files with 160 additions and 75 deletions

View file

@ -55,8 +55,7 @@ fn copy_dir(erg_path: &str, path: &str) -> std::io::Result<()> {
let filename = entry_path
.file_name()
.expect("this is not a file")
.to_str()
.unwrap();
.to_string_lossy();
let filename = format!("{full_path}/{filename}");
fs::copy(&entry_path, filename)?;
}