From 268bbd8414059c16886c600c08d803a2ba76341f Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Fri, 16 Dec 2022 22:38:58 -0500 Subject: [PATCH] Fix new (v1.66) Clippy warnings on Windows --- vm/src/stdlib/os.rs | 2 +- vm/src/stdlib/winreg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/src/stdlib/os.rs b/vm/src/stdlib/os.rs index c439c6e6a..511effcec 100644 --- a/vm/src/stdlib/os.rs +++ b/vm/src/stdlib/os.rs @@ -1109,7 +1109,7 @@ pub(super) mod _os { // TODO: replicate CPython's win32_xstat let [] = dir_fd.0; let meta = match file { - PathOrFd::Path(path) => super::fs_metadata(&path, follow_symlinks.0)?, + PathOrFd::Path(path) => super::fs_metadata(path, follow_symlinks.0)?, PathOrFd::Fd(fno) => { use std::os::windows::io::FromRawHandle; let handle = Fd(fno).to_raw_handle()?; diff --git a/vm/src/stdlib/winreg.rs b/vm/src/stdlib/winreg.rs index 17a430fd6..660df63da 100644 --- a/vm/src/stdlib/winreg.rs +++ b/vm/src/stdlib/winreg.rs @@ -258,7 +258,7 @@ mod winreg { value: PyStrRef, vm: &VirtualMachine, ) -> PyResult<()> { - if typ != REG_SZ as u32 { + if typ != REG_SZ { return Err(vm.new_type_error("type must be winreg.REG_SZ".to_owned())); } let subkey = subkey.as_ref().map_or("", |s| s.as_str());