flavray / avro-rs

Avro client library implementation in Rust
MIT License
169 stars 95 forks source link

Error caused by using `matches` #166

Closed Kalomidin closed 3 years ago

Kalomidin commented 3 years ago

https://github.com/flavray/avro-rs/blob/de6153ecea6fe660bcf20ff67f47a0b05211b8e1/src/schema.rs#L134 In that line, comma causing me build in error: SchemaKind::String, | ^ no rules expected this token in macro call avro_rs

However, when I switched to version 0.11.0, it was working fine since it is using following matching:

impl SchemaKind {
    pub fn is_primitive(self) -> bool {
        match self {
            SchemaKind::Null
            | SchemaKind::Boolean
            | SchemaKind::Int
            | SchemaKind::Long
            | SchemaKind::Double
            | SchemaKind::Float
            | SchemaKind::Bytes
            | SchemaKind::String => true,
            _ => false,
        }
    }
}

I was just wondering, whether it is better to switch to the previous implementation that is version 0.11.0?

poros commented 3 years ago

The error will disappear if you update your rust version. Is it something that you can do?

Kalomidin commented 3 years ago

@poros thank you for your response. It solved the issue for me. I will close the issue.