From 0ff08bb63a0035436b500befa7fea893519868fc Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 19 May 2021 09:32:37 +1200 Subject: [PATCH] Just treat u64 like i64 for now (#3442) --- crates/nu-protocol/src/value.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-protocol/src/value.rs b/crates/nu-protocol/src/value.rs index b4bd9caba0..947f267869 100644 --- a/crates/nu-protocol/src/value.rs +++ b/crates/nu-protocol/src/value.rs @@ -828,7 +828,7 @@ pub trait U64Ext { impl U64Ext for u64 { fn to_value(&self, the_tag: Tag) -> Value { Value { - value: UntaggedValue::Primitive(Primitive::BigInt(BigInt::from(*self))), + value: UntaggedValue::Primitive(Primitive::Int(*self as i64)), tag: the_tag, } } @@ -843,7 +843,7 @@ impl U64Ext for u64 { fn to_value_create_tag(&self) -> Value { let end = self.to_string().len(); Value { - value: UntaggedValue::Primitive(Primitive::BigInt(BigInt::from(*self))), + value: UntaggedValue::Primitive(Primitive::Int(*self as i64)), tag: Tag { anchor: None, span: Span::new(0, end), @@ -852,7 +852,7 @@ impl U64Ext for u64 { } fn to_untagged_value(&self) -> UntaggedValue { - UntaggedValue::big_int(*self) + UntaggedValue::int(*self as i64) } fn to_duration_untagged_value(&self) -> UntaggedValue {