diff options
Diffstat (limited to 'src/lisp/expr.rs')
-rw-r--r-- | src/lisp/expr.rs | 6 |
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 | ||
313 | impl From<i64> for LispExpr { | ||
314 | fn from(num: i64) -> Self { | ||
315 | LispExpr::Number(num.into()) | ||
316 | } | ||
317 | } | ||
318 | |||
313 | impl<'a> TryFrom<&'a LispExpr> for &'a LispNumber { | 319 | impl<'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> { |