diff options
| author | Austin Hellyer <[email protected]> | 2017-01-03 19:39:56 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-04 11:58:22 -0800 |
| commit | f57a187d564bdcd77f568e77a102d6d261832ee0 (patch) | |
| tree | 0c991c9995fcd37762aa4955e87fc0bddab4615a /src | |
| parent | 4011 is not handable (diff) | |
| download | serenity-f57a187d564bdcd77f568e77a102d6d261832ee0.tar.xz serenity-f57a187d564bdcd77f568e77a102d6d261832ee0.zip | |
Return a User from rest::get_user
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/rest/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/rest/mod.rs b/src/client/rest/mod.rs index a2e475d..8c5873e 100644 --- a/src/client/rest/mod.rs +++ b/src/client/rest/mod.rs @@ -1303,10 +1303,10 @@ pub fn get_upcoming_maintenances() -> Result<Vec<Maintenance>> { } /// Gets a user by Id. -pub fn get_user(user_id: u64) -> Result<CurrentUser> { +pub fn get_user(user_id: u64) -> Result<User> { let response = request!(Route::UsersId, get, "/users/{}", user_id); - CurrentUser::decode(serde_json::from_reader(response)?) + User::decode(serde_json::from_reader(response)?) } /// Gets our connections. |