pipe-op 0.0.1

The elixir pipe operator as a macro in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
use pipe_op::pipe;

fn add(a: usize, b: usize) -> Result<usize, Box<dyn std::error::Error>> {
    Ok(a + b)
}

fn main() -> Result<(), Box<dyn std::error::Error>>{
    let e = 10;
    assert_eq!(pipe!(e, add(10)?), 20);
    Ok(())
}