Skip to content

Commit

Permalink
Deprecate User::get
Browse files Browse the repository at this point in the history
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()`.
  • Loading branch information
Zeyla Hellyer committed Jun 2, 2017
1 parent 6579b1f commit afc571f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/model/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit afc571f

Please sign in to comment.