Reformat.

This commit is contained in:
Stephen Chung
2020-05-11 23:48:50 +08:00
parent 414f3d3c23
commit 33c9be7efc
7 changed files with 190 additions and 274 deletions

View File

@@ -95,7 +95,7 @@ impl<'a> State<'a> {
}
/// Add a new constant to the list.
pub fn push_constant(&mut self, name: &str, value: Expr) {
self.constants.push((name.to_string(), value))
self.constants.push((name.into(), value))
}
/// Look up a constant from the list.
pub fn find_constant(&self, name: &str) -> Option<&Expr> {