improve data hashmap retrieval handling
This commit is contained in:
parent
bbf8659587
commit
2531b4ac0d
|
@ -158,10 +158,7 @@ impl Writer {
|
||||||
|
|
||||||
fn parse_id(&mut self, node: &Node) -> Result<()> {
|
fn parse_id(&mut self, node: &Node) -> Result<()> {
|
||||||
if let NodeOp::Id(id) = &node.op {
|
if let NodeOp::Id(id) = &node.op {
|
||||||
let data_rec = match self.data.get(id) {
|
let data_rec = self.data.get(id).ok_or(Error::NotDefined)?;
|
||||||
Some(rec) => rec,
|
|
||||||
None => return Err(Error::NotDefined),
|
|
||||||
};
|
|
||||||
|
|
||||||
let data = Node::new(
|
let data = Node::new(
|
||||||
node.op.clone(),
|
node.op.clone(),
|
||||||
|
|
Loading…
Reference in New Issue