~vpzom/trout

a748fa0f28d94675cf193678e39c650e47abfd75 — Colin Reeder 1 year, 5 months ago a5ad55e
Add a few more impls for TupleAdd
2 files changed, 13 insertions(+), 1 deletions(-)

M Cargo.toml
M src/internal.rs
M Cargo.toml => Cargo.toml +1 -1
@@ 1,6 1,6 @@
[package]
name = "trout"
version = "0.1.0"
version = "0.1.1"
authors = ["Colin Reeder <colin@vpzom.click>"]
edition = "2018"
license = "MIT"

M src/internal.rs => src/internal.rs +12 -0
@@ 13,3 13,15 @@ impl<A, B> TupleAdd<(A,), B> for (A, B) {
        (prev.0, add)
    }
}

impl<A, B, C> TupleAdd<(A, B), C> for (A, B, C) {
    fn tuple_add(prev: (A, B), add: C) -> Self {
        (prev.0, prev.1, add)
    }
}

impl<A, B, C, D> TupleAdd<(A, B, C), D> for (A, B, C, D) {
    fn tuple_add(prev: (A, B, C), add: D) -> Self {
        (prev.0, prev.1, prev.2, add)
    }
}