diff --git a/Cargo.toml b/Cargo.toml index 190ab02..7df30ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ tokio = { version = "1", features = ["full"] } tokio-stream = "0.1" toml = "0.5" tui = "0.19" -users = "0.11" xdg = "2" [dev-dependencies] @@ -29,3 +28,6 @@ tempdir = "0.3" [target.'cfg(target_os="linux")'.dependencies] procfs = "0.14.1" + +[target.'cfg(target_family="unix")'.dependencies] +users = "0.11" diff --git a/src/browse/mod.rs b/src/browse/mod.rs index c1e264c..ab93c42 100644 --- a/src/browse/mod.rs +++ b/src/browse/mod.rs @@ -1,5 +1,5 @@ use crate::message::Message; -use anyhow::Result; +use anyhow::{anyhow, Result}; use tokio::sync::mpsc; #[cfg(target_family = "unix")] @@ -17,8 +17,10 @@ pub async fn browse_url(url: &String) { } #[cfg(not(target_family = "unix"))] -pub async fn browse_url_impl(url: &String) -> Result<()> { - anyhow!("Opening a browser is not supported on this platform") +pub async fn browse_url_impl(_url: &String) -> Result<()> { + Err(anyhow!( + "Opening a browser is not supported on this platform" + )) } #[inline] @@ -30,7 +32,7 @@ pub async fn handle_browser_open( #[cfg(not(target_family = "unix"))] async fn handle_browser_open_impl( - messages: mpsc::Sender, + _messages: mpsc::Sender, ) -> Result<()> { std::future::pending().await }