fn with_as_map() {
    let sink = Vec::new().with(|item| -> Result<i32, Never> {
        Ok(item * 2)
    });
    let sink = block_on(sink.send(0)).unwrap();
    let sink = block_on(sink.send(1)).unwrap();
    let sink = block_on(sink.send(2)).unwrap();
    assert_eq!(sink.get_ref(), &[0, 2, 4]);
}
// test simple use of with to change data
test simple use of with to change data
test simple use of with to change data
fn with_as_map() {
    let sink = Vec::new().with(|item| -> Result<i32, Never> {
        Ok(item * 2)
    });
    let sink = block_on(sink.send(0)).unwrap();
    let sink = block_on(sink.send(1)).unwrap();
    let sink = block_on(sink.send(2)).unwrap();
    assert_eq!(sink.get_ref(), &[0, 2, 4]);
}
fn with_as_map ( ) { let sink = Vec :: new ( ) . with ( | item | -> Result < i32 , Never > { Ok ( item * 2 ) } ) ; let sink = block_on ( sink . send ( 0 ) ) . unwrap ( ) ; let sink = block_on ( sink . send ( 1 ) ) . unwrap ( ) ; let sink = block_on ( sink . send ( 2 ) ) . unwrap ( ) ; assert_eq ! ( sink get_ref ( ) [ 0 2 4 ] ) ; }
test simple use of with to change data
test simple use of with to change data