aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-06-01 21:32:27 -0700
committerZeyla Hellyer <[email protected]>2017-06-01 21:32:27 -0700
commitafc571fd67c294cc10682db5c579d10645aec437 (patch)
tree0843d6507455a8f9df44d027f3f7cdd3e1b8499e /src/model
parentDeprecate *User::distinct, add *User::tag (diff)
downloadserenity-afc571fd67c294cc10682db5c579d10645aec437.tar.xz
serenity-afc571fd67c294cc10682db5c579d10645aec437.zip
Deprecate User::get
The function no longer fit's a short-lived period of serenity's design, where it would have been preferred to do `User::get(ID)` over `UserId(ID).get()`.
Diffstat (limited to 'src/model')
-rw-r--r--src/model/user.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/model/user.rs b/src/model/user.rs
index b96f517..4bbe1ec 100644
--- a/src/model/user.rs
+++ b/src/model/user.rs
@@ -490,6 +490,7 @@ impl User {
/// user.
///
/// [`ModelError::InvalidOperationAsUser`]: enum.ModelError.html#variant.InvalidOperationAsUser
+ #[deprecated(since="0.2.0", note="Don't use this, since it doesn't fit serenity's design.")]
#[inline]
pub fn get<U: Into<UserId>>(user_id: U) -> Result<User> {
user_id.into().get()