diff options
author | Hristo Venev <hristo@venev.name> | 2019-04-02 15:56:06 +0300 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-04-02 15:57:45 +0300 |
commit | b06338ec1d282a762440ad72c935717e404badca (patch) | |
tree | f6e441e97f7676e1acab6fc4ba72c3b875e97d9b /src/wg.rs | |
parent | c3269142f8d6c016ce8100b86fcae2031b145a9a (diff) |
Reorg, sources have names.
Diffstat (limited to 'src/wg.rs')
-rw-r--r-- | src/wg.rs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -8,13 +8,15 @@ use std::process::{Command, Stdio}; use std::{env, io}; pub struct Device { - ifname: String, + ifname: OsString, } impl Device { #[inline] - pub fn new(ifname: String) -> io::Result<Self> { - Ok(Device { ifname }) + pub fn new(ifname: OsString) -> io::Result<Self> { + let dev = Device { ifname }; + let _ = dev.get_public_key()?; + Ok(dev) } pub fn wg_command() -> Command { |