Skip to content

Commit

Permalink
message: derive MessageType from Eq
Browse files Browse the repository at this point in the history
New Rust is warning about using MessageType values in `match` blocks:

    warning: to use a constant of type
    `connection::dbus_bytestream::message::MessageType` in a pattern,
    `connection::dbus_bytestream::message::MessageType` must be
    annotated with `#[derive(PartialEq, Eq)]`,
    #[warn(illegal_struct_or_enum_constant_pattern)] on by default
  • Loading branch information
mathstuf committed Jun 12, 2016
1 parent bcfd92b commit 48b08c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use dbus_serialize::types::{Path,Variant,Value,BasicValue,Signature};
use marshal::{Marshal,pad_to_multiple};
use demarshal::{demarshal,DemarshalError};

#[derive(Debug,Default,PartialEq)]
#[derive(Debug,Default,PartialEq,Eq)]
pub struct MessageType(pub u8);
pub const MESSAGE_TYPE_INVALID : MessageType = MessageType(0);
pub const MESSAGE_TYPE_METHOD_CALL : MessageType = MessageType(1);
Expand Down

0 comments on commit 48b08c3

Please sign in to comment.