mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
fix(cable): filter out non-utf8 lines when loading cable candidates
This commit is contained in:
parent
510b528588
commit
abbd9157d3
@ -117,13 +117,15 @@ async fn load_candidates(command: String, injector: Injector<String>) {
|
||||
let reader = BufReader::new(out);
|
||||
let mut produced_output = false;
|
||||
|
||||
#[allow(clippy::manual_flatten)]
|
||||
for line in reader.lines() {
|
||||
let line = line.unwrap();
|
||||
if !line.trim().is_empty() {
|
||||
let () = injector.push(line, |e, cols| {
|
||||
cols[0] = e.clone().into();
|
||||
});
|
||||
produced_output = true;
|
||||
if let Ok(l) = line {
|
||||
if !l.trim().is_empty() {
|
||||
let () = injector.push(l, |e, cols| {
|
||||
cols[0] = e.clone().into();
|
||||
});
|
||||
produced_output = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user