ignore send failures without tripping the copy lint

This commit is contained in:
2026-09-21 01:33:39 +03:00
parent 1f95a0321b
commit c46fe82543
+8 -6
View File
@@ -461,7 +461,7 @@ fn two_pass_video(
if let Some(ref t) = tx { if let Some(ref t) = tx {
// The receiver is gone only if the UI navigated away; the encode is // The receiver is gone only if the UI navigated away; the encode is
// unaffected, so the send error is deliberately discarded. // unaffected, so the send error is deliberately discarded.
drop(t.send(EncodeProgress { pass: 1, total_passes: 2, percent: 100.0 })); t.send(EncodeProgress { pass: 1, total_passes: 2, percent: 100.0 }).ok();
} }
let mut pass2 = Command::new(ffmpeg); let mut pass2 = Command::new(ffmpeg);
@@ -1272,11 +1272,13 @@ fn run_impl(
if let Some(ref sender) = tx { if let Some(ref sender) = tx {
// A dropped receiver means the frontend is gone; // A dropped receiver means the frontend is gone;
// the encode keeps running either way. // the encode keeps running either way.
drop(sender.send(EncodeProgress { sender
pass, .send(EncodeProgress {
total_passes, pass,
percent, total_passes,
})); percent,
})
.ok();
} }
} }
// frame=, fps=, bitrate= and friends are not needed. // frame=, fps=, bitrate= and friends are not needed.