aboutsummaryrefslogtreecommitdiff
path: root/src/model/guild/mod.rs
diff options
context:
space:
mode:
authorLakelezz <[email protected]>2018-08-12 21:43:59 +0200
committerzeyla <[email protected]>2018-08-12 12:43:59 -0700
commit71edc3a11ac450728bca19ca7cab7c84079d59f0 (patch)
treebc6197f96ba9118ffa0b104c8434585d38bb6032 /src/model/guild/mod.rs
parentRevert "Send silence frames upon connection (Fix #301)" (diff)
downloadserenity-71edc3a11ac450728bca19ca7cab7c84079d59f0.tar.xz
serenity-71edc3a11ac450728bca19ca7cab7c84079d59f0.zip
Use `to_`- and `as_`-methods instead of `get` and `find` on Id newtypes
Diffstat (limited to 'src/model/guild/mod.rs')
-rw-r--r--src/model/guild/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/guild/mod.rs b/src/model/guild/mod.rs
index b5c6967..43cde4b 100644
--- a/src/model/guild/mod.rs
+++ b/src/model/guild/mod.rs
@@ -656,7 +656,7 @@ impl Guild {
///
/// Requires that the current user be in the guild.
#[inline]
- pub fn get<G: Into<GuildId>>(guild_id: G) -> Result<PartialGuild> { guild_id.into().get() }
+ pub fn get<G: Into<GuildId>>(guild_id: G) -> Result<PartialGuild> { guild_id.into().to_partial_guild() }
/// Returns which of two [`User`]s has a higher [`Member`] hierarchy.
///
@@ -1518,7 +1518,7 @@ impl Guild {
///
/// impl EventHandler for Handler {
/// fn message(&self, _: Context, msg: Message) {
- /// if let Some(arc) = msg.guild_id().unwrap().find() {
+ /// if let Some(arc) = msg.guild_id().unwrap().to_guild_cached() {
/// if let Some(role) = arc.read().role_by_name("role_name") {
/// println!("{:?}", role);
/// }