mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix new (v1.66) Clippy warnings on Windows
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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()?;
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user