mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
chore: eliminate unwrap
s
This commit is contained in:
parent
11f2b48853
commit
56f06a0a1e
14 changed files with 160 additions and 75 deletions
|
@ -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)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue