diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-02-11 13:58:11 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-02-14 10:57:29 +0100 |
| commit | 65c9161698966fe12bca7778ad99b61c4f1cce03 (patch) | |
| tree | a41fb291d255479d86a316f60205506c0ff542bf | |
| parent | afc87f9ae68997bf94a32e7d3718dfe61fd534a8 (diff) | |
| download | mullvadvpn-65c9161698966fe12bca7778ad99b61c4f1cce03.tar.xz mullvadvpn-65c9161698966fe12bca7778ad99b61c4f1cce03.zip | |
Replace some generics with impl Trait
| -rw-r--r-- | talpid-core/src/process/openvpn.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/talpid-core/src/process/openvpn.rs b/talpid-core/src/process/openvpn.rs index 1d50883142..50b9e59799 100644 --- a/talpid-core/src/process/openvpn.rs +++ b/talpid-core/src/process/openvpn.rs @@ -88,7 +88,7 @@ impl OpenVpnCommand { } /// Sets what configuration file will be given to OpenVPN - pub fn config<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn config(&mut self, path: impl AsRef<Path>) -> &mut Self { self.config = Some(path.as_ref().to_path_buf()); self } @@ -101,44 +101,44 @@ impl OpenVpnCommand { /// Sets the path to the file where the username and password for user-pass authentication /// is stored. See the `--auth-user-pass` OpenVPN documentation for details. - pub fn user_pass<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn user_pass(&mut self, path: impl AsRef<Path>) -> &mut Self { self.user_pass_path = Some(path.as_ref().to_path_buf()); self } /// Sets the path to the file where the username and password for proxy authentication /// is stored. - pub fn proxy_auth<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn proxy_auth(&mut self, path: impl AsRef<Path>) -> &mut Self { self.proxy_auth_path = Some(path.as_ref().to_path_buf()); self } /// Sets the path to the CA certificate file. - pub fn ca<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn ca(&mut self, path: impl AsRef<Path>) -> &mut Self { self.ca = Some(path.as_ref().to_path_buf()); self } /// Sets the path to the CRL (Certificate revocation list) file. - pub fn crl<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn crl(&mut self, path: impl AsRef<Path>) -> &mut Self { self.crl = Some(path.as_ref().to_path_buf()); self } /// Sets the path to the ip route command. - pub fn iproute_bin<S: Into<OsString>>(&mut self, iproute_bin: S) -> &mut Self { + pub fn iproute_bin(&mut self, iproute_bin: impl Into<OsString>) -> &mut Self { self.iproute_bin = Some(iproute_bin.into()); self } /// Sets a plugin and its arguments that OpenVPN will be started with. - pub fn plugin<P: AsRef<Path>>(&mut self, path: P, args: Vec<String>) -> &mut Self { + pub fn plugin(&mut self, path: impl AsRef<Path>, args: Vec<String>) -> &mut Self { self.plugin = Some((path.as_ref().to_path_buf(), args)); self } /// Sets a log file path. - pub fn log<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + pub fn log(&mut self, path: impl AsRef<Path>) -> &mut Self { self.log = Some(path.as_ref().to_path_buf()); self } |
