-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Currently I have code like this:
match repo.reference(remote, sigref) {
Err(git_ext::Error::Git(e)) if git_ext::is_not_found_err(&e) => None,
Err(git_ext::Error::NotFound(_)) => None,
Err(e) => return Err(e.into()),
...
};It would be nice if git_ext::Error simply had a is_not_found(&self) -> bool method, so that it could be converted to:
match repo.reference(remote, sigref) {
Err(e) if e.is_not_found() => None,
Err(e) => return Err(e.into()),
...
};This is the pattern I've been using with my other error types.
Metadata
Metadata
Assignees
Labels
No labels