diff options
| author | acdenisSK <[email protected]> | 2017-08-04 05:50:22 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-04 05:50:43 +0200 |
| commit | 7e913b6185468d2dd3740c711d418a300584b5bb (patch) | |
| tree | 1e48f9e3b66a3029921eafceffb2c219837d9d48 /src/model | |
| parent | Change to c-like enums and transmute (diff) | |
| download | serenity-7e913b6185468d2dd3740c711d418a300584b5bb.tar.xz serenity-7e913b6185468d2dd3740c711d418a300584b5bb.zip | |
Make some functions accept anything that's implemented Display
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/channel/channel_id.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/channel/channel_id.rs b/src/model/channel/channel_id.rs index 4de9710..1c7eb46 100644 --- a/src/model/channel/channel_id.rs +++ b/src/model/channel/channel_id.rs @@ -369,7 +369,7 @@ impl ChannelId { /// [`ChannelId`]: struct.ChannelId.html /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong #[inline] - pub fn say(&self, content: &str) -> Result<Message> { + pub fn say<D: ::std::fmt::Display>(&self, content: D) -> Result<Message> { self.send_message(|m| m.content(content)) } |