Skip to content

Commit

Permalink
feat(cable) keep data input order
Browse files Browse the repository at this point in the history
  • Loading branch information
xosxos committed Jan 6, 2025
1 parent da2396e commit feeed45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions crates/television-channels/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ strum = { version = "0.26.3", features = ["derive"] }
lazy_static = "1.5.0"
toml = "0.8.19"
regex = "1.11.1"
indexmap = "2.7.0"

[lints]
workspace = true
4 changes: 2 additions & 2 deletions crates/television-channels/src/channels/cable.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use color_eyre::Result;
use indexmap::IndexSet;
use lazy_static::lazy_static;
use regex::Regex;
use std::collections::HashSet;
use tracing::debug;

use crate::cable::{CableChannelPrototype, DEFAULT_DELIMITER};
Expand Down Expand Up @@ -108,7 +108,7 @@ async fn load_candidates(command: String, injector: Injector<String>) {
let decoded_output = String::from_utf8(output.stdout).unwrap();
debug!("Decoded output: {:?}", decoded_output);

for line in decoded_output.lines().collect::<HashSet<_>>() {
for line in decoded_output.lines().collect::<IndexSet<_>>() {
if !line.trim().is_empty() {
let () = injector.push(line.to_string(), |e, cols| {
cols[0] = e.clone().into();
Expand Down

0 comments on commit feeed45

Please sign in to comment.