elichai / log-derive

A procedural macro for auto logging output of functions
https://docs.rs/log-derive
Apache License 2.0
189 stars 12 forks source link

Stop breaking type coercion #25

Open elichai opened 4 years ago

elichai commented 4 years ago

The current way we match over the result breaks type coercion, example:

example this will break: (https://play.rust-lang.org/?gist=487d56225ce4b06116eb357f75bf6474)

#[logfn(INFO)]
fn first() -> Result<u8, Box<dyn Error>> {
    Err(Box::new(MyError))
}

Possible solutions:

Quba1 commented 2 years ago

If the possible solution is merged might this issue be now closed?