https://github.com/durobot/minigrep
Minigrep example from The Rust Programming Language book
https://github.com/durobot/minigrep
Last synced: 3 months ago
JSON representation
Minigrep example from The Rust Programming Language book
- Host: GitHub
- URL: https://github.com/durobot/minigrep
- Owner: Durobot
- Created: 2020-12-15T14:32:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-12T21:10:54.000Z (over 4 years ago)
- Last Synced: 2025-02-15T06:53:57.126Z (3 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Minigrep example from The Rust Programming Language book
This is the [Minigrep example project](https://doc.rust-lang.org/stable/book/ch12-00-an-io-project.html) from [The Rust Programming Language](https://doc.rust-lang.org/stable/book/) book, my take on it anyway (not 100% verbatim).
To run, use `cargo run `
For example `cargo run to poem.txt`
To run a case-insensitive search, set `CASE_INSENSITIVE` environment variable first, for example
`CASE_INSENSITIVE=1 cargo run to poem.txt`
To run the tests, issue the usual `cargo test` command.