with-macro 0.1.1

Syntactic sugar for calling methods
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[test]
fn macro_name() {
    use with_macro::with as with_renamed;

    let v = with_renamed! {
        mut Vec::new() =>
            .push(42)
            .push(13)
    };

    assert_eq!(v, [42, 13]);
}