From c29e2a70f0d8db6d67d83e46af19d811b85f81bc Mon Sep 17 00:00:00 2001 From: Raine Date: Sat, 14 Oct 2023 22:39:16 +0200 Subject: [PATCH] fix: make fs a feature --- Cargo.toml | 3 ++- src/lib.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 88cf077..69ca8f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["dom"] +default = ["dom", "fs"] dom = [] +fs = [] [dependencies] diff --git a/src/lib.rs b/src/lib.rs index 6a7102e..96b64e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ pub mod dom; /// All sorts of general use macros pub mod macros; +#[cfg(feature = "fs")] /// Filesystem things pub mod filesystem; @@ -29,6 +30,7 @@ mod tests { assert_eq!(String::from("foo"), into!(String, foo)); } + #[cfg(feature = "fs")] #[test] fn fs() { if let Ok(_) = std::path::Path::new("./file").ensure_file() {