Skip to content

Commit 6f12e35

Browse files
committed
Fix os_symlink compile error
1 parent 00a0e45 commit 6f12e35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vm/src/stdlib/os.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,17 +853,17 @@ fn os_symlink(
853853
vm: &VirtualMachine,
854854
) -> PyResult<()> {
855855
use std::os::windows::fs as win_fs;
856-
let ret = match fs::metadata(&dst.value) {
856+
let ret = match fs::metadata(dst.as_str()) {
857857
Ok(meta) => {
858858
if meta.is_file() {
859-
win_fs::symlink_file(&src.value, &dst.value)
859+
win_fs::symlink_file(src.as_str(), dst.as_str())
860860
} else if meta.is_dir() {
861-
win_fs::symlink_dir(&src.value, &dst.value)
861+
win_fs::symlink_dir(src.as_str(), dst.as_str())
862862
} else {
863863
panic!("Uknown file type");
864864
}
865865
}
866-
Err(_) => win_fs::symlink_file(&src.value, &dst.value),
866+
Err(_) => win_fs::symlink_file(src.as_str(), dst.as_str()),
867867
};
868868
ret.map_err(|err| convert_io_error(vm, err))
869869
}

0 commit comments

Comments
 (0)