Skip to content

Commit b2af5a1

Browse files
fix clippy errors, try 2
1 parent bf7a330 commit b2af5a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src-tauri/src/services/ffmpeg_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl FFmpegHandler {
298298
let mut was_intentionally_stopped = false;
299299
let mut recent_lines: VecDeque<String> = VecDeque::with_capacity(40);
300300

301-
for line in reader.lines().flatten() {
301+
for line in reader.lines().map_while(Result::ok) {
302302
// Check if process is still running (was it intentionally stopped?)
303303
{
304304
if let Ok(stopping) = stopping_groups.lock() {
@@ -557,7 +557,7 @@ impl FFmpegHandler {
557557
if let Some(stderr) = child.stderr.take() {
558558
thread::spawn(move || {
559559
let reader = BufReader::new(stderr);
560-
for line in reader.lines().flatten() {
560+
for line in reader.lines().map_while(Result::ok) {
561561
if line.contains("[error]") || line.contains("[warning]") {
562562
log::warn!("[FFmpeg:relay] {line}");
563563
}

0 commit comments

Comments
 (0)