diff options
| author | Austin Hellyer <[email protected]> | 2017-01-24 11:03:31 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-24 11:03:31 -0800 |
| commit | 8260b04fc40857bf0e50d00d91ec900f6700d02d (patch) | |
| tree | de3e680d7c9ef48734b7ddac684ba4317cd180e7 /src/model/utils.rs | |
| parent | Avoid a lot of Arc/Message/RwLock clones (diff) | |
| download | serenity-8260b04fc40857bf0e50d00d91ec900f6700d02d.tar.xz serenity-8260b04fc40857bf0e50d00d91ec900f6700d02d.zip | |
Properly drop on binds
Instead of binding to `_why`, bind to `_`, dropping the value.
This is pretty much just leftover from when the library was being
rapidly developed before being released.
Diffstat (limited to 'src/model/utils.rs')
| -rw-r--r-- | src/model/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/utils.rs b/src/model/utils.rs index dee9a08..58701bb 100644 --- a/src/model/utils.rs +++ b/src/model/utils.rs @@ -259,7 +259,7 @@ pub fn into_u64(value: Value) -> Result<u64> { Value::I64(v) => Ok(v as u64), Value::String(v) => match v.parse::<u64>() { Ok(v) => Ok(v), - Err(_why) => Err(Error::Decode("Expected valid u64", Value::String(v))), + Err(_) => Err(Error::Decode("Expected valid u64", Value::String(v))), }, Value::U64(v) => Ok(v), value => Err(Error::Decode("Expected u64", value)), @@ -280,8 +280,8 @@ pub fn decode_discriminator(value: Value) -> Result<u16> { Value::U64(v) => Ok(v as u16), Value::String(s) => match s.parse::<u16>() { Ok(v) => Ok(v), - Err(_why) => Err(Error::Decode("Error parsing discriminator as u16", - Value::String(s))), + Err(_) => Err(Error::Decode("Error parsing discriminator as u16", + Value::String(s))), }, value => Err(Error::Decode("Expected string or u64", value)), } |