rev_lines icon indicating copy to clipboard operation
rev_lines copied to clipboard

[Q] Is it possible to use rev_lines and the regular order interchangeably?

Open yctwo opened this issue 4 years ago • 0 comments

I'm trying to do the following:

    let lines = if something_is_true {
        RevLines::new(BufReader::new(file)).unwrap()
    } else {
        BufReader::new(file).lines()
    };

However, this is not a valid Rust syntax since the types are incompatible for the if and else arm. Any suggestions?

yctwo avatar Sep 23 '20 17:09 yctwo