martin-g commented on code in PR #681:
URL: https://github.com/apache/avro-rs/pull/681#discussion_r4033655617


##########
avro/src/decimal.rs:
##########
@@ -111,13 +121,14 @@ impl From<Decimal> for BigInt {
 /// Gets the internal byte array representation of a referenced decimal.
 /// Usage:
 /// ```
-/// use apache_avro::Decimal;
-/// use std::convert::TryFrom;
-///
-/// let decimal = Decimal::from(vec![1, 24]);
-/// let maybe_bytes = <Vec<u8>>::try_from(&decimal);
+/// # use std::convert::TryFrom;
+/// # use apache_avro::{Decimal, Error};
+/// #
+/// let decimal = Decimal::new([1, 24])?;
+/// let maybe_bytes = <Vec<u8>>::try_from(decimal);

Review Comment:
   ```suggestion
   /// let maybe_bytes = <Vec<u8>>::try_from(&decimal);
   ```



-- 
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]

Reply via email to