diff --git a/src/ch13-03-improving-our-io-project.md b/src/ch13-03-improving-our-io-project.md index 57e085b1f..b10a054ec 100644 --- a/src/ch13-03-improving-our-io-project.md +++ b/src/ch13-03-improving-our-io-project.md @@ -168,6 +168,8 @@ number when we sent you chapter 12, we will fix it. /Carol --> ```rust fn grep_case_insensitive<'a>(search: &str, contents: &'a str) -> Vec<&'a str> { + let search = search.to_lowercase(); + contents.lines() .filter(|line| { line.to_lowercase().contains(&search)