These are chat archives for rust-lang/rust

20th
Feb 2017
JasonKleban
@JasonKleban
Feb 20 2017 00:25
I'm not sure how to get around this laziness borrow issue:
    num::range_step(99, 0, -1)
    .flat_map(|a| {
        num::range_step(a, 0, -1)
        .map(|b| {
            a * b
        })
    })
    .find(|&x| is_palendrome(x))
    .unwrap()
I need a and b to live until .find()
I tried giving the outer function a lifetime parameter and then making the map parameters be references somehow so they can have that lifetime too, but I couldn't figure that out
JasonKleban
@JasonKleban
Feb 20 2017 00:33
I guess I could declare the range of a separately as a let binding I guess, but that wouldn't account for b
Alexey
@KalitaAlexey
Feb 20 2017 18:02
I am happy to announce that a new version of vscode-rust is available.
Repository
Marketplace