We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea28c4c commit ee75d4dCopy full SHA for ee75d4d
src/file/imp/unix.rs
@@ -108,6 +108,11 @@ pub fn reopen(_file: &File, _path: &Path) -> io::Result<File> {
108
109
#[cfg(not(target_os = "redox"))]
110
pub fn persist(old_path: &Path, new_path: &Path, overwrite: bool) -> io::Result<()> {
111
+ #[cfg(target_os = "wasi")]
112
+ let old_path = old_path.as_os_str().as_encoded_bytes();
113
114
+ let new_path = new_path.as_os_str().as_encoded_bytes();
115
+
116
if overwrite {
117
rename(old_path, new_path)?;
118
} else {
0 commit comments