Skip to content

Commit

Permalink
Merge pull request #50 from txdv/cat-preserve-order
Browse files Browse the repository at this point in the history
preserve order in cat
  • Loading branch information
manojkarthick authored Apr 2, 2024
2 parents 002174b + b5dcdaf commit a69721e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rand = "0.8.5"
walkdir = "2.3.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
linked_hash_set = "0.1.4"

[dev-dependencies]
assert_cmd = "2.0.4"
Expand Down
3 changes: 1 addition & 2 deletions src/commands/cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::utils::Formats;
use crate::utils::{check_path_present, is_hidden, open_file, print_rows};
use clap::Parser;
use log::debug;
use std::collections::HashSet;
use std::fs::metadata;
use std::path::PathBuf;
use walkdir::WalkDir;
Expand Down Expand Up @@ -45,7 +44,7 @@ pub(crate) fn execute(opts: CatCommandArgs) -> Result<(), PQRSError> {
);

let mut directories = vec![];
let mut files = HashSet::new();
let mut files = linked_hash_set::LinkedHashSet::new();
for location in &opts.locations {
let meta = metadata(location).unwrap();
if meta.is_dir() {
Expand Down

0 comments on commit a69721e

Please sign in to comment.