Skip to content

Commit 5518e0d

Browse files
authored
Merge pull request sfackler#283 from rory/connect-params-eq
Add Eq, ParialEq and Hash to ConnectParams (etc)
2 parents e652546 + 7aef9a6 commit 5518e0d

File tree

1 file changed

+3
-3
lines changed
  • postgres-shared/src/params

1 file changed

+3
-3
lines changed

postgres-shared/src/params/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use params::url::Url;
88
mod url;
99

1010
/// The host.
11-
#[derive(Clone, Debug)]
11+
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
1212
pub enum Host {
1313
/// A TCP hostname.
1414
Tcp(String),
@@ -17,7 +17,7 @@ pub enum Host {
1717
}
1818

1919
/// Authentication information.
20-
#[derive(Clone, Debug)]
20+
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
2121
pub struct User {
2222
name: String,
2323
password: Option<String>,
@@ -36,7 +36,7 @@ impl User {
3636
}
3737

3838
/// Information necessary to open a new connection to a Postgres server.
39-
#[derive(Clone, Debug)]
39+
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
4040
pub struct ConnectParams {
4141
host: Host,
4242
port: u16,

0 commit comments

Comments
 (0)