Switch duration back to bigint (#3554)

This commit is contained in:
JT
2021-06-04 19:39:12 +12:00
committed by GitHub
parent 7d78f40bf6
commit 4bca36f479
7 changed files with 66 additions and 35 deletions

View File

@ -35,7 +35,7 @@ impl FromValue for Tagged<num_bigint::BigInt> {
Value {
value: UntaggedValue::Primitive(Primitive::Duration(i)),
..
} => Ok(BigInt::from(*i).tagged(tag)),
} => Ok(i.clone().tagged(tag)),
Value { tag, .. } => Err(ShellError::labeled_error(
"Can't convert to integer",
"can't convert to integer",
@ -59,7 +59,7 @@ impl FromValue for num_bigint::BigInt {
Value {
value: UntaggedValue::Primitive(Primitive::Duration(i)),
..
} => Ok(BigInt::from(*i)),
} => Ok(i.clone()),
Value { tag, .. } => Err(ShellError::labeled_error(
"Can't convert to integer",
"can't convert to integer",