Fix new (v1.66) Clippy warnings on Windows

This commit is contained in:
Padraic Fanning committed 2022-12-17 13:12:12 -05:00
1 parent 5701061e63
commit 268bbd8414
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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()?;
+1 -1
View File
@@ -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());