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 (#263)
Fixes #262
This commit is contained in:
parent
510b528588
commit
9433fea80d
@ -117,13 +117,15 @@ async fn load_candidates(command: String, injector: Injector<String>) {
|
|||||||
let reader = BufReader::new(out);
|
let reader = BufReader::new(out);
|
||||||
let mut produced_output = false;
|
let mut produced_output = false;
|
||||||
|
|
||||||
|
#[allow(clippy::manual_flatten)]
|
||||||
for line in reader.lines() {
|
for line in reader.lines() {
|
||||||
let line = line.unwrap();
|
if let Ok(l) = line {
|
||||||
if !line.trim().is_empty() {
|
if !l.trim().is_empty() {
|
||||||
let () = injector.push(line, |e, cols| {
|
let () = injector.push(l, |e, cols| {
|
||||||
cols[0] = e.clone().into();
|
cols[0] = e.clone().into();
|
||||||
});
|
});
|
||||||
produced_output = true;
|
produced_output = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user