Skip to content

Commit

Permalink
Add the removed Error::is_connect() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubadamw committed Jan 27, 2024
1 parent bfde94b commit c7acf89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,10 @@ impl StdError for Error {
}

impl Error {
pub fn is_connect(&self) -> bool {
matches!(self.kind, ErrorKind::Connect)
}

fn is_canceled(&self) -> bool {
matches!(self.kind, ErrorKind::Canceled)
}
Expand Down

0 comments on commit c7acf89

Please sign in to comment.