grrs-lazy

Crates.iogrrs-lazy
lib.rsgrrs-lazy
version0.2.0
sourcesrc
created_at2019-01-06 12:15:27.188661
updated_at2019-01-06 12:35:49.354336
descriptionA tool to search files
homepagehttps://github.com/crodjer/grrs/
repositoryhttps://github.com/crodjer/grrs/
max_upload_size
id105831
size5,883
Rohan Jain (crodjer)

documentation

README

grrs-lazy

Crate Build Status

A simple search utility, based on the rust cli-wg tutorial: https://rust-lang-nursery.github.io/cli-wg/tutorial/

It has a few differences from the final grrs built in the tutorial:

  1. Separated out find_matches in src/lib.rs.
  2. Using std::io::BufReader instead of std::fs::read_to_string, so that we avoid loading all the content from a file in memory.
  3. Dealing with iterators in find_matches, so that the processing is done in a lazy stream.

Installation

To install, run:

cargo install grrs-lazy

You can then search for lines in a text file:

$ grrs-lazy Sherlock path/to/the-adventures-of-sherlock-holmes.txt | wc -c
6089
Commit count: 10

cargo fmt