flavray/avro-rs

Error caused by using `matches`

Closed this issue · 2 comments

| SchemaKind::String,

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

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

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