# HG changeset patch # User Raphaël Gomès # Date 2023-01-09 18:37:05 # Node ID be3b545c5cffaa31d1a10eaa320b56c515fd535c # Parent 136aa80aa8b27538ce091ee380929bdec0f7c900 rust-clippy: fix remaining warnings in `hg-cpython` diff --git a/rust/hg-cpython/src/copy_tracing.rs b/rust/hg-cpython/src/copy_tracing.rs --- a/rust/hg-cpython/src/copy_tracing.rs +++ b/rust/hg-cpython/src/copy_tracing.rs @@ -103,7 +103,7 @@ pub fn combine_changeset_copies_wrapper( // thread can drop it. Otherwise the GIL would be implicitly // acquired here through `impl Drop for PyBytes`. if let Some(bytes) = opt_bytes { - if let Err(_) = pybytes_sender.send(bytes.unwrap()) { + if pybytes_sender.send(bytes.unwrap()).is_err() { // The channel is disconnected, meaning the parent // thread panicked or returned // early through diff --git a/rust/hg-cpython/src/pybytes_deref.rs b/rust/hg-cpython/src/pybytes_deref.rs --- a/rust/hg-cpython/src/pybytes_deref.rs +++ b/rust/hg-cpython/src/pybytes_deref.rs @@ -47,6 +47,7 @@ fn require_send() {} #[allow(unused)] fn static_assert_pybytes_is_send() { + #[allow(clippy::no_effect)] require_send::; }