Improve arg parsing
This commit is contained in:
@@ -10,7 +10,15 @@ pub struct MapExtractor {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl ObjectExtractor for MapExtractor {
|
||||
async fn field(&self, name: &Label) -> Result<Option<PileValue>, std::io::Error> {
|
||||
async fn field(
|
||||
&self,
|
||||
name: &Label,
|
||||
args: Option<&str>,
|
||||
) -> Result<Option<PileValue>, std::io::Error> {
|
||||
if args.is_some() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
Ok(self.inner.get(name).cloned())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user