srrrse

Results 226 comments of srrrse

It should work if you add `as Box` to the return expression, but its frustrating that the cast doesn't happen automatically here the way it normally would. Can you build...

A possible fix for this issue would be to change the expansion of return expressions from wrapping in ok to wrapping in ok and casting to the ret type.

Unfortunately there's no way to fix this in fehler, because its implemented as a procedural macro.

The compiler could have a warning that a must_use on a function that returns a must_use type is redundant.

Instead of rejecting it, could we make it generate a modified method signature with no body?

Also, it's not ugly. :) Manipulating Rust's very complex AST just requires code like this to handle all of the special cases.

There's not really a better way around it. Well, for the example you gave, this could be more elegant: ```rust match bar { Some(foo) if foo.blah() != 3 => {...

The point was really to show that explicit return works. An ideal formulation would show both explicit and implicit return in both result and option examples.

Hey, thanks for this PR! I've actually been interested recently in revisiting this library in a number of ways and prepping a 1.0 release, and this was one of the...

Interesting. So it seems like you actually want to visit all of the "words" as we've defined them for this purpose. Probably a more correct API for your use case...