rust/hg-cpython/src/copy_tracing.rs
changeset 49933 be3b545c5cff
parent 47953 8f031a274cd6
child 50976 4c5f6e95df84
--- 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