aboutsummaryrefslogtreecommitdiff
path: root/src/lisp/number.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp/number.rs')
-rw-r--r--src/lisp/number.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lisp/number.rs b/src/lisp/number.rs
index 4824e21..06c6baa 100644
--- a/src/lisp/number.rs
+++ b/src/lisp/number.rs
@@ -1,5 +1,6 @@
1use std::{ 1use std::{
2 cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}, 2 cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd},
3 convert::From,
3 fmt, 4 fmt,
4 ops::{Add, Mul, Sub}, 5 ops::{Add, Mul, Sub},
5}; 6};
@@ -113,3 +114,9 @@ impl fmt::Display for LispNumber {
113 } 114 }
114 } 115 }
115} 116}
117
118impl From<i64> for LispNumber {
119 fn from(target: i64) -> Self {
120 LispNumber::Integer(target)
121 }
122}