aboutsummaryrefslogtreecommitdiff
path: root/src/lisp/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp/expr.rs')
-rw-r--r--src/lisp/expr.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lisp/expr.rs b/src/lisp/expr.rs
index 692f951..d086ecf 100644
--- a/src/lisp/expr.rs
+++ b/src/lisp/expr.rs
@@ -310,6 +310,12 @@ impl TryFrom<LispExpr> for LispNumber {
310 } 310 }
311} 311}
312 312
313impl From<i64> for LispExpr {
314 fn from(num: i64) -> Self {
315 LispExpr::Number(num.into())
316 }
317}
318
313impl<'a> TryFrom<&'a LispExpr> for &'a LispNumber { 319impl<'a> TryFrom<&'a LispExpr> for &'a LispNumber {
314 type Error = LispError; 320 type Error = LispError;
315 fn try_from(value: &'a LispExpr) -> Result<Self, Self::Error> { 321 fn try_from(value: &'a LispExpr) -> Result<Self, Self::Error> {