fix: make fs a feature
This commit is contained in:
parent
5ede522eeb
commit
c29e2a70f0
2 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,8 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["dom"]
|
default = ["dom", "fs"]
|
||||||
dom = []
|
dom = []
|
||||||
|
fs = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -5,6 +5,7 @@ pub mod dom;
|
||||||
/// All sorts of general use macros
|
/// All sorts of general use macros
|
||||||
pub mod macros;
|
pub mod macros;
|
||||||
|
|
||||||
|
#[cfg(feature = "fs")]
|
||||||
/// Filesystem things
|
/// Filesystem things
|
||||||
pub mod filesystem;
|
pub mod filesystem;
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ mod tests {
|
||||||
assert_eq!(String::from("foo"), into!(String, foo));
|
assert_eq!(String::from("foo"), into!(String, foo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "fs")]
|
||||||
#[test]
|
#[test]
|
||||||
fn fs() {
|
fn fs() {
|
||||||
if let Ok(_) = std::path::Path::new("./file").ensure_file() {
|
if let Ok(_) = std::path::Path::new("./file").ensure_file() {
|
||||||
|
|
Loading…
Reference in a new issue