From 9c10e92980a631f9014156c982bf1cb82c209a87 Mon Sep 17 00:00:00 2001
From: Will Angenent <will.angenent@gmail.com>
Date: Sun, 2 Apr 2023 14:04:20 +0100
Subject: [PATCH] Remove conditionals so that builds work on non-linux OSses

---
 Cargo.toml     | 2 --
 src/lib.rs     | 2 --
 src/redoxfs.rs | 6 ------
 3 files changed, 10 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index c12f5e8..111a050 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,6 +14,4 @@ redox_syscall = "0.2.16"
 redoxfs = "0.5.4"
 tempfile = "3.4.0"
 toml = "0.7.2"
-
-[target.'cfg(target_os = "linux")'.dependencies]
 proc-mounts = "0.3.0"
diff --git a/src/lib.rs b/src/lib.rs
index 4bba940..27beafb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,8 +14,6 @@ const SUPPORTED_TARGETS: &'static [&'static str] = &[
     "i686-unknown-redox",
 ];
 
-//TODO: Confirm capabilities on other OSes
-#[cfg(target_os = "linux")]
 fn installed(program: &str) -> io::Result<bool> {
     process::Command::new("which")
         .arg(program)
diff --git a/src/redoxfs.rs b/src/redoxfs.rs
index 64296dd..77a79aa 100644
--- a/src/redoxfs.rs
+++ b/src/redoxfs.rs
@@ -20,8 +20,6 @@ impl RedoxFs {
         Ok(s)
     }
 
-    //TODO: Confirm capabilities on other OSes
-    #[cfg(target_os = "linux")]
     pub fn mount(&mut self) -> io::Result<()> {
         if self.mounted()? {
             return Err(io::Error::new(
@@ -66,8 +64,6 @@ impl RedoxFs {
         Ok(())
     }
 
-    //TODO: Confirm capabilities on other OSes
-    #[cfg(target_os = "linux")]
     pub fn unmount(&mut self) -> io::Result<()> {
         if self.mounted()? {
             Command::new("fusermount")
@@ -87,8 +83,6 @@ impl RedoxFs {
         Ok(())
     }
 
-    //TODO: Confirm capabilities on other OSes
-    #[cfg(target_os = "linux")]
     pub fn mounted(&self) -> io::Result<bool> {
         use proc_mounts::MountIter;
 
-- 
GitLab