martin-g commented on code in PR #2961:
URL: https://github.com/apache/avro/pull/2961#discussion_r1648503709
##########
lang/rust/avro/src/schema.rs:
##########
@@ -902,7 +902,10 @@ impl UnionSchema {
/// Returns true if the any of the variants of this `UnionSchema` is
`Null`.
pub fn is_nullable(&self) -> bool {
- !self.schemas.is_empty() && self.schemas.iter().any(|s| s ==
&Schema::Null)
+ self.schemas.iter().any(|x| match x {
+ Schema::Null => true,
+ _ => false
Review Comment:
```suggestion
_ => false,
```
--
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]