Use a Result

This commit is contained in:
greg 2017-10-01 19:31:43 -07:00
parent 6435d5e958
commit 89482e5b5a

View File

@ -50,13 +50,12 @@ impl ReplState {
Float(f) => Some(format!("{}", f)), Float(f) => Some(format!("{}", f)),
Str(s) => Some(format!("\"{}\"", s)), Str(s) => Some(format!("\"{}\"", s)),
Bool(b) => Some(format!("{}", b)), Bool(b) => Some(format!("{}", b)),
_ => None, Other => None,
} }
}) })
}, },
Statement::Declaration(decl) => { Statement::Declaration(decl) => {
self.eval_decl(decl); self.eval_decl(decl).map(|_| None)
Ok(None)
} }
} }
} }