Move optional mod parse
This commit is contained in:
@@ -23,4 +23,4 @@ dbconn = { path = "../dbconn" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
devread = []
|
||||
devread = []
|
||||
|
||||
@@ -8,22 +8,9 @@ pub mod generated {}
|
||||
#[cfg(feature = "devread")]
|
||||
pub mod parse;
|
||||
#[cfg(not(feature = "devread"))]
|
||||
pub mod parse {
|
||||
use crate::ItemSer;
|
||||
use async_channel::Receiver;
|
||||
use err::Error;
|
||||
use netpod::NodeConfigCached;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
type RT1 = Box<dyn ItemSer + Send>;
|
||||
|
||||
pub async fn scan_files(
|
||||
_pairs: BTreeMap<String, String>,
|
||||
_node_config: NodeConfigCached,
|
||||
) -> Result<Receiver<Result<RT1, Error>>, Error> {
|
||||
Err(Error::with_msg("feature not enabled"))
|
||||
}
|
||||
}
|
||||
pub mod parsestub;
|
||||
#[cfg(not(feature = "devread"))]
|
||||
pub use parsestub as parse;
|
||||
#[cfg(feature = "devread")]
|
||||
#[cfg(test)]
|
||||
pub mod test;
|
||||
|
||||
14
archapp/src/parsestub.rs
Normal file
14
archapp/src/parsestub.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::ItemSer;
|
||||
use async_channel::Receiver;
|
||||
use err::Error;
|
||||
use netpod::NodeConfigCached;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
type RT1 = Box<dyn ItemSer + Send>;
|
||||
|
||||
pub async fn scan_files(
|
||||
_pairs: BTreeMap<String, String>,
|
||||
_node_config: NodeConfigCached,
|
||||
) -> Result<Receiver<Result<RT1, Error>>, Error> {
|
||||
Err(Error::with_msg("feature not enabled"))
|
||||
}
|
||||
Reference in New Issue
Block a user