"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "crates/ignore/examples/walk.rs" between
ripgrep-12.1.1.tar.gz and ripgrep-13.0.0.tar.gz

About: ripgrep is a command line search tool ("rg") that tries to combine the usability of "ag" (an "ack" clone) with the raw speed of GNU "grep" (written in "Rust").

walk.rs  (ripgrep-12.1.1):walk.rs  (ripgrep-13.0.0)
extern crate crossbeam_channel as channel;
extern crate ignore;
extern crate walkdir;
use std::env; use std::env;
use std::io::{self, Write}; use std::io::{self, Write};
use std::path::Path; use std::path::Path;
use std::thread; use std::thread;
use ignore::WalkBuilder; use ignore::WalkBuilder;
use walkdir::WalkDir; use walkdir::WalkDir;
fn main() { fn main() {
let mut path = env::args().nth(1).unwrap(); let mut path = env::args().nth(1).unwrap();
let mut parallel = false; let mut parallel = false;
let mut simple = false; let mut simple = false;
let (tx, rx) = channel::bounded::<DirEntry>(100); let (tx, rx) = crossbeam_channel::bounded::<DirEntry>(100);
if path == "parallel" { if path == "parallel" {
path = env::args().nth(2).unwrap(); path = env::args().nth(2).unwrap();
parallel = true; parallel = true;
} else if path == "walkdir" { } else if path == "walkdir" {
path = env::args().nth(2).unwrap(); path = env::args().nth(2).unwrap();
simple = true; simple = true;
} }
let stdout_thread = thread::spawn(move || { let stdout_thread = thread::spawn(move || {
let mut stdout = io::BufWriter::new(io::stdout()); let mut stdout = io::BufWriter::new(io::stdout());
 End of changes. 2 change blocks. 
5 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)