Ever done something hundreds of times before, then you're doing (what you think is) the same thing again, but it doesn't work?
What am I doing wrong in this piece of code?
Why isn't it picking up on the From
conversion trait?
The error is:
error[E0308]: mismatched types
--> src/lib.rs:34:5
|
33 | fn do_bar_thing(&self, foo: &Foo<T>) -> Result<(), BarError> {
| -------------------- expected `std::result::Result<(), BarError>` because of return type
34 | foo.do_foo_thing()
| ^^^^^^^^^^^^^^^^^^ expected enum `BarError`, found enum `FooError`
|
= note: expected enum `std::result::Result<_, BarError>`
found enum `std::result::Result<_, FooError>`