aboutsummaryrefslogtreecommitdiff
path: root/src/wg.rs
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-09-28 16:21:28 +0000
committerHristo Venev <hristo@venev.name>2019-09-28 16:22:07 +0000
commit8e6318f29eb022126e82e0c084262c77d9ee3300 (patch)
tree0a6d8a88e1e1f96daff61e1d19b144f93aa8f256 /src/wg.rs
parent3a5552509439612accf579becc7cb85a596bd466 (diff)
Implement peer overrides.
Diffstat (limited to 'src/wg.rs')
-rw-r--r--src/wg.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wg.rs b/src/wg.rs
index c3eeb57..7565a02 100644
--- a/src/wg.rs
+++ b/src/wg.rs
@@ -13,7 +13,7 @@ pub struct Device {
impl Device {
#[inline]
- pub fn new(ifname: OsString) -> io::Result<Self> {
+ pub fn open(ifname: OsString) -> io::Result<Self> {
let dev = Self { ifname };
let _ = dev.get_public_key()?;
Ok(dev)
@@ -67,7 +67,7 @@ impl Device {
if *old_peer == *conf {
continue;
}
- old_endpoint = old_peer.endpoint.clone();
+ old_endpoint = old_peer.endpoint;
} else {
old_endpoint = None;
}