Skip to content

Commit 67efdae

Browse files
committed
try to restore original code
1 parent 8d64a23 commit 67efdae

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

native/explorer/src/series/from_list.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,14 @@ pub fn s_from_list_decimal(
240240
})
241241
}
242242

243-
TermType::Map => {
244-
let ex_decimal = item
245-
.decode::<ExDecimal>()
246-
.map_err(|error| {
247-
ExplorerError::Other(format!(
248-
"cannot decode a valid decimal from term; check that `coef` fits into an `i128`. error: {error:?}"
249-
))
250-
})?;
251-
let coef = ex_decimal.signed_coef()?;
252-
Ok(AnyValue::Decimal(coef, ex_decimal.scale()))
253-
},
243+
TermType::Map => item
244+
.decode::<ExDecimal>()
245+
.map_err(|err| {
246+
ExplorerError::Other(format!(
247+
"cannot decode a valid decimal from term; check that `coef` fits into an `i128`. error: {err:?}"
248+
))
249+
})
250+
.and_then(|ex_decimal| Ok(AnyValue::Decimal(ex_decimal.signed_coef()?, ex_decimal.scale()))),
254251

255252
TermType::Atom => Ok(AnyValue::Null),
256253

0 commit comments

Comments
 (0)