From f46df3e35940fc78163945eed33e58fafed0b06b Mon Sep 17 00:00:00 2001 From: linbingquan <695601626@qq.com> Date: Sun, 18 Dec 2022 06:20:15 +0800 Subject: chore: update to Rust 1.66.0 (#17078) --- runtime/fs_util.rs | 2 +- runtime/ops/fs.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/fs_util.rs b/runtime/fs_util.rs index 30598e041..a71e70986 100644 --- a/runtime/fs_util.rs +++ b/runtime/fs_util.rs @@ -28,7 +28,7 @@ pub fn resolve_from_cwd(path: &Path) -> Result { } else { let cwd = current_dir().context("Failed to get current working directory")?; - Ok(normalize_path(&cwd.join(path))) + Ok(normalize_path(cwd.join(path))) } } diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index ec60eed62..b9f637448 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -525,7 +525,14 @@ fn op_umask(state: &mut OpState, mask: Option) -> Result { let _ = umask(prev); prev }; - Ok(r.bits() as u32) + #[cfg(target_os = "linux")] + { + Ok(r.bits()) + } + #[cfg(target_os = "macos")] + { + Ok(r.bits() as u32) + } } } -- cgit v1.2.3