diff options
author | Hristo Venev <hristo@venev.name> | 2019-09-28 16:21:28 +0000 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-09-28 16:22:07 +0000 |
commit | 8e6318f29eb022126e82e0c084262c77d9ee3300 (patch) | |
tree | 0a6d8a88e1e1f96daff61e1d19b144f93aa8f256 /src/model.rs | |
parent | 3a5552509439612accf579becc7cb85a596bd466 (diff) |
Implement peer overrides.
Diffstat (limited to 'src/model.rs')
-rw-r--r-- | src/model.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/model.rs b/src/model.rs index 51386a5..90f9b44 100644 --- a/src/model.rs +++ b/src/model.rs @@ -15,7 +15,7 @@ pub use ip::*; pub type KeyParseError = base64::DecodeError; -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] pub struct Key([u8; 32]); impl Key { @@ -82,7 +82,7 @@ impl<'de> serde::Deserialize<'de> for Key { } } -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] pub struct Endpoint { address: Ipv6Addr, port: u16, @@ -195,13 +195,6 @@ pub struct Config { pub peers: HashMap<Key, Peer>, } -impl Default for Config { - #[inline] - fn default() -> Self { - Self::empty() - } -} - impl Config { #[inline] pub fn empty() -> Self { |