Kriskras99 commented on code in PR #423:
URL: https://github.com/apache/avro-rs/pull/423#discussion_r2718768607


##########
avro/src/schema/record/schema.rs:
##########
@@ -90,11 +90,14 @@ mod tests {
 
         let record_schema = RecordSchema::builder()
             .name(name.clone())
-            .aliases(Some(vec!["alias_1".into()]))
+            .aliases(Some(vec!["alias_1".try_into().expect("Alias is valid")]))

Review Comment:
   That is not possible because of a generic implementation by Rust:
   ```rust
   impl<T, U> TryFrom<U> for T
   where
       U: Into<T>,
   ```
   In my opinion this is important enough to break code, people who don't care 
can just use `unwrap`/`?`/`expect`.
   
   I did update the commit to use `?` in a lot of places.



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