You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think Result<()> of remove is not good typing, as it groups both key not found and other errors into one type. The signature of get is much better, as we can infer from the returned result:
Result(Some(...)): a corresponding value is found
Result(None): there is no corresponding value
Error(...): error happened
My proposal is to have remove returns the same type as get:
Now, the trait is:
I think
Result<()>
ofremove
is not good typing, as it groups both key not found and other errors into one type. The signature ofget
is much better, as we can infer from the returned result:Result(Some(...))
: a corresponding value is foundResult(None)
: there is no corresponding valueError(...)
: error happenedMy proposal is to have
remove
returns the same type asget
:The text was updated successfully, but these errors were encountered: