So far I have only been able to accomplish this with these two lines:
let lines: Vec<String> = reader.lines().map(|line| line.unwrap()).collect();
let lines: Vec<&str> = lines.iter().map(|s| s.as_str()).collect();
If I try to do the as_str() in the first line, I get a compiler error that I'm trying to return a value referencing a temporary value even if I clone after unwraping.