diff options
| author | acdenisSK <[email protected]> | 2017-09-04 11:32:54 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-09-04 11:33:06 +0200 |
| commit | 673852fd164a4d50335e60e4071011300ab860a9 (patch) | |
| tree | bb22221a952df0d4ab803484e9059094ede1f0a1 /src/model | |
| parent | Fix the PRESET_GENERAL permission constant (diff) | |
| download | serenity-673852fd164a4d50335e60e4071011300ab860a9.tar.xz serenity-673852fd164a4d50335e60e4071011300ab860a9.zip | |
match to map/?
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/user.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/model/user.rs b/src/model/user.rs index 359d497..60efa21 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -212,10 +212,7 @@ impl CurrentUser { /// [`HttpError::InvalidRequest`]: ../http/enum.HttpError.html#variant.InvalidRequest pub fn invite_url(&self, permissions: Permissions) -> Result<String> { let bits = permissions.bits(); - let client_id = match http::get_current_application_info() { - Ok(v) => v.id, - Err(e) => return Err(e), - }; + let client_id = http::get_current_application_info().map(|v| v.id)?; let mut url = format!( "https://discordapp.com/api/oauth2/authorize?client_id={}&scope=bot", |