Implement PartialEq for ConnectionError

We do this for other error types, and it's trivial to do here.

Fixes #1562.
This commit is contained in:
Sean Griffin 2018-02-17 15:07:25 -07:00
parent c12bea51f7
commit b517c543f1
2 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,8 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
[`.single_value()`]: http://docs.diesel.rs/diesel/query_dsl/trait.QueryDsl.html#method.single_value
* `ConnectionError` now implements `PartialEq`.
### Changed
* The bounds on `impl ToSql for Cow<'a, T>` have been loosened to no longer

View File

@ -166,7 +166,7 @@ impl DatabaseErrorInformation for String {
/// Errors which can occur during [`Connection::establish`]
///
/// [`Connection::establish`]: ../connection/trait.Connection.html#tymethod.establish
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum ConnectionError {
/// The connection URL contained a `NUL` byte.
InvalidCString(NulError),