commit 2cea8f772eaa2c8e015438e6cff16ac7188efbdd
parent 0ad1c99d04d7d995db8a3fab576c5237a6a6a977
Author: lash <dev@holbrook.no>
Date: Sun, 30 Jun 2024 17:58:19 +0100
Make fs get a feature
Diffstat:
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
@@ -21,4 +21,5 @@ http = "^1.0"
[dev-dependencies]
tempfile = "3.3.0"
-
+[features]
+fs = []
diff --git a/src/io.rs b/src/io.rs
@@ -14,4 +14,5 @@ pub trait FeedPut {
fn put(&self, feed: &Feed, s: &str, method: Option<FeedMethod>) -> u64;
}
+#[cfg(feature = "fs")]
pub mod fs;
diff --git a/src/io/fs.rs b/src/io/fs.rs
@@ -19,8 +19,3 @@ impl FeedGet for Fs {
Ok(feed)
}
}
-
-
-//pub get() -> Entry {
-//
-//}
diff --git a/src/tests.rs b/src/tests.rs
@@ -1,6 +1,8 @@
use super::Sequencer;
use feed_rs::model::Entry;
use super::io::FeedGet;
+
+#[cfg(feature = "fs")]
use super::io::fs::Fs;
#[test]
@@ -19,6 +21,7 @@ fn test_entry_guard() {
}
#[test]
+#[cfg(feature = "fs")]
fn test_feed_get() {
let r: bool;
let fs = Fs{};