martin-g commented on code in PR #246:
URL: https://github.com/apache/avro-rs/pull/246#discussion_r2272390632
##########
avro/src/types.rs:
##########
@@ -332,793 +319,931 @@ impl TryFrom<Value> for JsonValue {
.map(|(key, value)| Self::try_from(value).map(|v| (key, v)))
.collect::<Result<Vec<_>, _>>()
.map(|v| Self::Object(v.into_iter().collect())),
- Value::Date(d) => Ok(Self::Number(d.into())),
+ Value::Date(d) => Ok(serde_json::Value::Number(d.into())),
Value::Decimal(ref d) => <Vec<u8>>::try_from(d)
.map(|vec| Self::Array(vec.into_iter().map(|v|
v.into()).collect())),
Value::BigDecimal(ref bg) => {
- let vec1: Vec<u8> = serialize_big_decimal(bg)?;
- Ok(Self::Array(vec1.into_iter().map(|b| b.into()).collect()))
+ let vec1: Vec<u8> =
crate::bigdecimal::sync::serialize_big_decimal(bg)?;
Review Comment:
@Kriskras99 I need some help here.
This is an impl of TryFrom (i.e. cannot be async) and it needs to use an
async function here (`serialize_big_decimal` that uses several `encode_xyz()`
async functions).
Ideas how to make it work ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]