Closed apopiak closed 4 years ago
So this means the workshop is no longer compatible with v1.0 right?
Should the instructions be updated accordingly?
Is it a better idea to do all the updating on a separate branch?
@JoshOrndorff I compiled it with v1.0.
Oh great. I didn't realize DispatchResult
would work there. Glad to hear it still works.
It does rely on a renaming import (use support::dispatch::Result as DispatchResult
) which I'm happy to make explicit in the snippet. This is necessary because the adder
function needs a different Result type.
@apopiak it might be better just to explicitly return Result<(), &'static str>
which relies on no renaming or imports.
The Rust code on this page had some errors so I fixed it. (Relies on specifying some imports correctly, but so did the original.) Verified to (at least) compile in my personal branch of the workshop.