Just treat u64 like i64 for now (#3442)

This commit is contained in:
JT 2021-05-19 09:32:37 +12:00 committed by GitHub
parent 08c0bf52bc
commit 0ff08bb63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -828,7 +828,7 @@ pub trait U64Ext {
impl U64Ext for u64 { impl U64Ext for u64 {
fn to_value(&self, the_tag: Tag) -> Value { fn to_value(&self, the_tag: Tag) -> Value {
Value { Value {
value: UntaggedValue::Primitive(Primitive::BigInt(BigInt::from(*self))), value: UntaggedValue::Primitive(Primitive::Int(*self as i64)),
tag: the_tag, tag: the_tag,
} }
} }
@ -843,7 +843,7 @@ impl U64Ext for u64 {
fn to_value_create_tag(&self) -> Value { fn to_value_create_tag(&self) -> Value {
let end = self.to_string().len(); let end = self.to_string().len();
Value { Value {
value: UntaggedValue::Primitive(Primitive::BigInt(BigInt::from(*self))), value: UntaggedValue::Primitive(Primitive::Int(*self as i64)),
tag: Tag { tag: Tag {
anchor: None, anchor: None,
span: Span::new(0, end), span: Span::new(0, end),
@ -852,7 +852,7 @@ impl U64Ext for u64 {
} }
fn to_untagged_value(&self) -> UntaggedValue { fn to_untagged_value(&self) -> UntaggedValue {
UntaggedValue::big_int(*self) UntaggedValue::int(*self as i64)
} }
fn to_duration_untagged_value(&self) -> UntaggedValue { fn to_duration_untagged_value(&self) -> UntaggedValue {