-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It's a little thing and it's good for ergonomics when checking whether an error occurred or if the row did not exist when using ::get()
to be able to do
match result {
Ok(_) => unimplemented!(),
Err(e) => {
if e == Error::NoSuchObject {
// ...
} else {
// ...
}
// VS.
match e {
Error::NoSuchObject => {
// ...
},
_ => {
// ...
}
}
}
}
It's prettier than having to nest another match
to check for one of all the possible errors (less lines of code and less nesting for the same purpose). This is implemented by deriving the Error
enum with:
#[derive(PartialEq, Eq)]
pub enum Error {
...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request