fn filter_lines(options: Arc<Options>,
                in_channel: Receiver<String>,
                out_channel: SyncSender<String>) {
    // We can simply iterate over the channel, which will stop when the channel is closed.
    for line in in_channel.iter() {
        // `contains` works on lots of types of patterns, but in particular, we can use it to test whether
        // one string is contained in another. This is another example of Rust using traits as substitute for overloading.
        if line.contains(&options.pattern) {
            unimplemented!()
        }
    }
}
// The second function filters the lines it receives through `in_channel` with the pattern, and sends
// matches via `out_channel`.
The second function filters the lines it receives through `in_channel` with the pattern, and sends
matches via `out_channel`.
The second function filters the lines it receives through ` in_channel ` with the pattern and sends matches via ` out_channel ` .
fn filter_lines(options: Arc<Options>,
                in_channel: Receiver<String>,
                out_channel: SyncSender<String>) {
    // We can simply iterate over the channel, which will stop when the channel is closed.
    for line in in_channel.iter() {
        // `contains` works on lots of types of patterns, but in particular, we can use it to test whether
        // one string is contained in another. This is another example of Rust using traits as substitute for overloading.
        if line.contains(&options.pattern) {
            unimplemented!()
        }
    }
}
fn filter_lines ( options : Arc < Options > , in_channel : Receiver < String > , out_channel : SyncSender < String > ) { // We can simply iterate over the channel, which will stop when the channel is closed. for line in in_channel . iter ( ) { // `contains` works on lots of types of patterns, but in particular, we can use it to test whether // one string is contained in another. This is another example of Rust using traits as substitute for overloading. if line . contains ( & options . pattern ) { unimplemented ! ( ) } } }
The second function filters the lines it receives through `in_channel` with the pattern, and sends
matches via `out_channel`.
The second function filters the lines it receives through ` in_channel ` with the pattern and sends matches via ` out_channel ` .
options
Arc<Options>
in_channel
Receiver<String>
out_channel
SyncSender<String>
options
Arc<Options>
in_channel
Receiver<String>
out_channel
SyncSender<String>