aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel.rs
diff options
context:
space:
mode:
authorIllia <[email protected]>2016-12-06 23:51:42 +0200
committerzeyla <[email protected]>2016-12-06 13:51:42 -0800
commit13de5c2e50410c3a68435dc774537b490bb7115c (patch)
tree798c633e9e06e520083b29fa4417f089f476d0e0 /src/model/channel.rs
parentFix changelog header (diff)
downloadserenity-13de5c2e50410c3a68435dc774537b490bb7115c.tar.xz
serenity-13de5c2e50410c3a68435dc774537b490bb7115c.zip
Improve Mentions, fix MessageBuilder
Remove the obsolete Mention struct as well as related methods, improve the way mentioning works, fix the message builder, add a test for all this.
Diffstat (limited to 'src/model/channel.rs')
-rw-r--r--src/model/channel.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/model/channel.rs b/src/model/channel.rs
index 13f51b9..7036a1d 100644
--- a/src/model/channel.rs
+++ b/src/model/channel.rs
@@ -955,13 +955,6 @@ impl GuildChannel {
CACHE.read().unwrap().get_guild(self.guild_id).cloned()
}
- /// Return a [`Mention`] which will link to this channel.
- ///
- /// [`Mention`]: struct.Mention.html
- pub fn mention(&self) -> Mention {
- self.id.mention()
- }
-
/// Gets all channel's pins.
#[cfg(feature = "methods")]
pub fn pins(&self) -> Result<Vec<Message>> {
@@ -1023,7 +1016,7 @@ impl GuildChannel {
impl fmt::Display for GuildChannel {
/// Formas the channel, creating a mention of it.
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::Display::fmt(&self.mention(), f)
+ fmt::Display::fmt(&self.id.mention(), f)
}
}