// The third function performs the output operations, receiving the relevant lines on its `in_channel`.
The third function performs the output operations, receiving the relevant lines on its `in_channel`.
The third function performs the output operations receiving the relevant lines on its ` in_channel ` .
fn output_lines(options: Arc<Options>, in_channel: Receiver<String>) {
    match options.output_mode {
        Print => {
            // Here, we just print every line we see.
            for line in in_channel.iter() {
                unimplemented!()
            }
        },
        Count => {
            // We are supposed to count the number of matching lines. There's a convenient iterator adapter that
            // we can use for this job.
            unimplemented!()
        },
        SortAndPrint => {
            // We are asked to sort the matching lines before printing. So let's collect them all in a local vector...
            let mut data: Vec<String> = in_channel.iter().collect();
            // ...and implement the actual sorting later.
            unimplemented!()
        }
    }
}
fn output_lines ( options : Arc < Options > , in_channel : Receiver < String > ) { match options . output_mode { Print => { // Here, we just print every line we see. for line in in_channel . iter ( ) { unimplemented ! ( ) } } , Count => { // We are supposed to count the number of matching lines. There's a convenient iterator adapter that // we can use for this job. unimplemented ! ( ) } , SortAndPrint => { // We are asked to sort the matching lines before printing. So let's collect them all in a local vector... let mut data : Vec < String > = in_channel . iter ( ) . collect ( ) ; // ...and implement the actual sorting later. unimplemented ! ( ) } } }
The third function performs the output operations, receiving the relevant lines on its `in_channel`.
The third function performs the output operations receiving the relevant lines on its ` in_channel ` .
options
Arc<Options>
in_channel
Receiver<String>