Improve arg parsing
This commit is contained in:
@@ -10,6 +10,7 @@ pub trait ObjectExtractor: Send + Sync {
|
||||
async fn field(
|
||||
&self,
|
||||
name: &pile_config::Label,
|
||||
args: Option<&str>,
|
||||
) -> Result<Option<crate::value::PileValue>, std::io::Error>;
|
||||
|
||||
/// Return all fields in this extractor.
|
||||
@@ -22,7 +23,7 @@ pub trait ObjectExtractor: Send + Sync {
|
||||
let keys = self.fields().await?;
|
||||
let mut map = serde_json::Map::new();
|
||||
for k in &keys {
|
||||
let v = match self.field(k).await? {
|
||||
let v = match self.field(k, None).await? {
|
||||
Some(x) => x,
|
||||
None => continue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user