Skip to content

Commit

Permalink
Add impl AsRef<MessageId> for Message (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishio595 authored and arqunis committed Jul 25, 2018
1 parent 7a93557 commit 1de3937
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/model/channel/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,12 @@ impl Message {
}
}

impl AsRef<MessageId> for Message {
fn as_ref(&self) -> &MessageId {
&self.id
}
}

impl From<Message> for MessageId {
/// Gets the Id of a `Message`.
fn from(message: Message) -> MessageId { message.id }
Expand Down

0 comments on commit 1de3937

Please sign in to comment.