diff options
| -rw-r--r-- | talpid-core/src/tunnel/mod.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/talpid-core/src/tunnel/mod.rs b/talpid-core/src/tunnel/mod.rs index bbdd8919a8..b8d91c567e 100644 --- a/talpid-core/src/tunnel/mod.rs +++ b/talpid-core/src/tunnel/mod.rs @@ -135,18 +135,16 @@ impl TunnelMonitor { } } - fn get_library_extension() -> Result<String> { - let ext = if cfg!(target_os = "macos") { - "dylib" + fn get_library_extension() -> Result<&'static str> { + if cfg!(target_os = "macos") { + Ok("dylib") } else if cfg!(unix) { - "so" + Ok("so") } else if cfg!(windows) { - "dll" + Ok("dll") } else { bail!(ErrorKind::UnsupportedPlatform); - }; - - Ok(ext.to_owned()) + } } fn get_config_path() -> Option<PathBuf> { |
