aboutsummaryrefslogtreecommitdiff
path: root/src/client/dispatch.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-19 20:50:33 -0800
committerAustin Hellyer <[email protected]>2016-11-19 20:50:33 -0800
commit66f4acc63163a5f7bd528165ee5fe9ae7d44eb7d (patch)
tree357b4f4632138b6e0270c177cccd445b1c4f2d98 /src/client/dispatch.rs
parentFix type errors for non-framework builds (diff)
downloadserenity-66f4acc63163a5f7bd528165ee5fe9ae7d44eb7d.tar.xz
serenity-66f4acc63163a5f7bd528165ee5fe9ae7d44eb7d.zip
Rename state methods from find_ to get_
For consistency with the rest of the library, rename the methods prefixed with `find_` to `get_`. The past logic was that items are "found", as they may or may not exist. With get, the expectation is that it is _always_ there, i.e. over REST. However, this is inconsistent, and "get"ting over REST can fail for other reasons.
Diffstat (limited to 'src/client/dispatch.rs')
-rw-r--r--src/client/dispatch.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs
index ad40497..8c10e75 100644
--- a/src/client/dispatch.rs
+++ b/src/client/dispatch.rs
@@ -255,7 +255,7 @@ fn handle_event(event: Event,
feature_state! {{
let before = STATE.lock()
.unwrap()
- .find_channel(event.channel.id());
+ .get_channel(event.channel.id());
update!(update_with_channel_update, event);
thread::spawn(move || {
@@ -413,7 +413,7 @@ fn handle_event(event: Event,
// could fail under any circumstance.
let after = STATE.lock()
.unwrap()
- .find_member(event.guild_id, event.user.id)
+ .get_member(event.guild_id, event.user.id)
.unwrap()
.clone();