Skip to content
Permalink
Browse files

Switch to crossbeam channels

  • Loading branch information
XAMPPRocky committed Nov 12, 2019
1 parent b1d3688 commit 49ae79c8ac2841e5507aa34514089c4e2d87a2bb
Showing with 30 additions and 2 deletions.
  1. +27 −0 Cargo.lock
  2. +1 −0 Cargo.toml
  3. +2 −2 src/utils/fs.rs

Some generated files are not rendered by default. Learn more.

@@ -38,6 +38,7 @@ serde_derive = "1.0.102"
term_size = "0.3.1"
toml = "0.5.5"
grep-searcher = "0.1.6"
crossbeam-channel = "0.4.0"

[dependencies.env_logger]
features = []
@@ -1,4 +1,4 @@
use std::{collections::BTreeMap, error::Error, path::Path, sync::mpsc};
use std::{collections::BTreeMap, error::Error, path::Path};

use ignore::{overrides::OverrideBuilder, WalkBuilder, WalkState::Continue};

@@ -20,7 +20,7 @@ pub fn get_all_files<A: AsRef<Path>>(
languages: &mut BTreeMap<LanguageType, Language>,
config: &Config,
) {
let (tx, rx) = mpsc::channel();
let (tx, rx) = crossbeam_channel::unbounded();

let mut paths = paths.iter();
let mut walker = WalkBuilder::new(paths.next().unwrap());

0 comments on commit 49ae79c

Please sign in to comment.
You can’t perform that action at this time.