diff options
author | Andrew Gallant <jamslam@gmail.com> | 2018-08-03 17:26:22 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-08-20 07:10:19 -0400 |
commit | bb110c1ebeeda452046830b3991f705f5759da92 (patch) | |
tree | cc2b0112a3ca9b8d05cf1e953553907d71564082 /ignore | |
parent | d9ca5293569efb255608d3c601107bcfe7060f15 (diff) |
ripgrep: migrate to libripgrep
This commit does the work to delete the old `grep` crate and effectively
rewrite most of ripgrep core to use the new libripgrep crates. The new
`grep` crate is now a facade that collects the various crates that make
up libripgrep.
The most complex part of ripgrep core is now arguably the translation
between command line parameters and the library options, which is
ultimately where we want to be.
Diffstat (limited to 'ignore')
-rw-r--r-- | ignore/Cargo.toml | 2 | ||||
-rw-r--r-- | ignore/README.md | 2 | ||||
-rw-r--r-- | ignore/examples/walk.rs | 5 |
3 files changed, 2 insertions, 7 deletions
diff --git a/ignore/Cargo.toml b/ignore/Cargo.toml index 13217135..42b043bf 100644 --- a/ignore/Cargo.toml +++ b/ignore/Cargo.toml @@ -26,7 +26,7 @@ memchr = "2" regex = "1" same-file = "1" thread_local = "0.3.2" -walkdir = "2" +walkdir = "2.2.0" [target.'cfg(windows)'.dependencies.winapi] version = "0.3" diff --git a/ignore/README.md b/ignore/README.md index f527da46..b0e659a9 100644 --- a/ignore/README.md +++ b/ignore/README.md @@ -4,7 +4,7 @@ The ignore crate provides a fast recursive directory iterator that respects various filters such as globs, file types and `.gitignore` files. This crate also provides lower level direct access to gitignore and file type matchers. -[![Linux build status](https://api.travis-ci.org/BurntSushi/ripgrep.png)](https://travis-ci.org/BurntSushi/ripgrep) +[![Linux build status](https://api.travis-ci.org/BurntSushi/ripgrep.svg)](https://travis-ci.org/BurntSushi/ripgrep) [![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/ripgrep?svg=true)](https://ci.appveyor.com/project/BurntSushi/ripgrep) [![](https://img.shields.io/crates/v/ignore.svg)](https://crates.io/crates/ignore) diff --git a/ignore/examples/walk.rs b/ignore/examples/walk.rs index 0ff4ea94..ad64e015 100644 --- a/ignore/examples/walk.rs +++ b/ignore/examples/walk.rs @@ -1,5 +1,3 @@ -#![allow(dead_code, unused_imports, unused_mut, unused_variables)] - extern crate crossbeam; extern crate ignore; extern crate walkdir; @@ -8,7 +6,6 @@ use std::env; use std::io::{self, Write}; use std::path::Path; use std::sync::Arc; -use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; use crossbeam::sync::MsQueue; @@ -48,13 +45,11 @@ fn main() { }) }); } else if simple { - let mut stdout = io::BufWriter::new(io::stdout()); let walker = WalkDir::new(path); for result in walker { queue.push(Some(DirEntry::X(result.unwrap()))); } } else { - let mut stdout = io::BufWriter::new(io::stdout()); let walker = WalkBuilder::new(path).build(); for result in walker { queue.push(Some(DirEntry::Y(result.unwrap()))); |