Q: rayon::str::Lines<'_'> is not an iterator I'm trying process a file line by line in Rust and parallelise this using Rayon. It complains of the following
rayon::str::Lines<'_>` is not an iterator
   = help: the trait `std::iter::Iterator` is not implemented for 
   = note: required by `std::iter::IntoIterator::into_iter`

This is what the code looks like so far
use rayon::prelude::*;
use std::fs;

fn main() {
    let file_content = match fs::read_to_string("input.txt") {
        Ok(s) => s,
        Err(e) => {
            eprintln!("Error: {}", e);
            std::process::exit(1);
        }
    };

    file_content = 5;

    for line in file_content.par_lines() {
        println!("{}", line);
    }

    std::process::exit(0);
}

Am I missing a trait definition? How could I fix this error?

A: You can't use parallel iterators with the (non-parallel) for loop. 
Instead, use .for_each(|| …) callback on the parallel iterator. 
Alternatively, first call .collect::<Vec<_>>(), and then non-parallel for.
For more advanced cases you can also send results to a channel in parallel, and then use non-parallel for to read from the channel.
