Mercurial > hg
diff rust/hg-cpython/src/copy_tracing.rs @ 49933:be3b545c5cff
rust-clippy: fix remaining warnings in `hg-cpython`
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 09 Jan 2023 19:37:05 +0100 |
parents | 8f031a274cd6 |
children | 4c5f6e95df84 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/copy_tracing.rs Mon Jan 09 19:36:41 2023 +0100 +++ b/rust/hg-cpython/src/copy_tracing.rs Mon Jan 09 19:37:05 2023 +0100 @@ -103,7 +103,7 @@ // 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