A better version of the minigrep project in the Rust Book - Chapter 12 and my first project in Rust
.
-
Used iterator features instead of performing a for loop through the vector items collected from iterator.
-
Added abality to pass
--ignore-case
argument to search with case-insensitive behavior beside environment variableIGNORE_CASE
. -
If the
file_path
argument isn't passed, it now reads from thestdin
and beside:minigrep query poem.txt --ignore-case
Can be run this way as well:
cat poem.txt | minigrep query --ignore-case