Suchergebnisse für Anfrage "filterfunction"
Was ist die idiomatischste Art, mit einem Iterator of Results zu arbeiten?
Ich habe Code wie folgt: let things = vec![/* ...*/]; // e.g. Vec<String> things .map(|thing| { let a = try!(do_stuff(thing)); Ok(other_stuff(a)) }) .filter(|thing_result| match *thing_result { Err(e) => true, Ok(a) => check(a), }) ...