Skip to content

Commit 305c6c0

Browse files
committed
Fix clippy warnings
1 parent 7ca88e8 commit 305c6c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

vm/src/obj/objdict.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ impl PyDictRef {
182182
pub fn len(self) -> usize {
183183
self.entries.len()
184184
}
185+
pub fn is_empty(&self) -> bool {
186+
self.entries.len() == 0
187+
}
185188

186189
#[pymethod(magic)]
187190
fn sizeof(self) -> usize {

vm/src/stdlib/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ fn os_wexitstatus(status: i32) -> i32 {
18011801
fn os_waitpid(pid: libc::pid_t, opt: i32, vm: &VirtualMachine) -> PyResult<(libc::pid_t, i32)> {
18021802
let mut status = 0;
18031803
let pid = unsafe { libc::waitpid(pid, &mut status, opt) };
1804-
let pid = Errno::result(pid).map_err(|e| convert_nix_error(vm, e.into()))?;
1804+
let pid = Errno::result(pid).map_err(|e| convert_nix_error(vm, e))?;
18051805
Ok((pid, status))
18061806
}
18071807
#[cfg(unix)]

0 commit comments

Comments
 (0)