diff --git a/src/sources/youtube.rs b/src/sources/youtube.rs index 9c4c7bc1..aa4dd467 100644 --- a/src/sources/youtube.rs +++ b/src/sources/youtube.rs @@ -69,7 +69,7 @@ impl YouTubeRestartable { let reader = BufReader::new(stdout); - let lines = reader.lines().flatten().map(|line| { + let lines = reader.lines().map_while(Result::ok).map(|line| { let entry: Value = serde_json::from_str(&line).unwrap(); entry .get("webpage_url")