auto-delegate 0.1.3

Auto delegate allows you that automatic impl of traits and delegate their handling to child members.
Documentation
use auto_delegate_impl::{delegate, Delegate};

#[delegate]
trait Calc {
    fn calc(&self, lhs: usize, rhs: usize) -> usize;
}


#[derive(Default)]
struct Add;

impl Calc for Add {
    fn calc(&self, lhs: usize, rhs: usize) -> usize {
        lhs + rhs
    }
}


#[derive(Delegate, Default)]
struct Calculator {
    #[to(Calc)]
    base: Add,
}

fn main() {
    let calc = Calculator::default();
    assert_eq!(calc.calc(1, 2), 3);
}