diff options
| author | acdenisSK <[email protected]> | 2017-10-14 22:41:25 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-10-14 22:41:25 +0200 |
| commit | cae014758a1d1e926a71679f02e32601c57f8d52 (patch) | |
| tree | 39270dbc2df916a91c3c4272600fd082a2604516 /src/model/channel/message.rs | |
| parent | Switch to parking_lot::{Mutex, RwLock} (diff) | |
| parent | Release v0.4.1 (diff) | |
| download | serenity-cae014758a1d1e926a71679f02e32601c57f8d52.tar.xz serenity-cae014758a1d1e926a71679f02e32601c57f8d52.zip | |
Update to account for changes made in 0.4.1
Diffstat (limited to 'src/model/channel/message.rs')
| -rw-r--r-- | src/model/channel/message.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs index f6efd74..0e939b2 100644 --- a/src/model/channel/message.rs +++ b/src/model/channel/message.rs @@ -370,7 +370,7 @@ impl Message { // Check if the content is over the maximum number of unicode code // points. let count = content.chars().count() as i64; - let diff = count - (constants::MESSAGE_CODE_LIMIT as i64); + let diff = count - i64::from(constants::MESSAGE_CODE_LIMIT); if diff > 0 { Some(diff as u64) @@ -561,7 +561,7 @@ impl Message { if total <= constants::EMBED_MAX_LENGTH as usize { Ok(()) } else { - let overflow = total as u64 - constants::EMBED_MAX_LENGTH as u64; + let overflow = total as u64 - u64::from(constants::EMBED_MAX_LENGTH); Err(Error::Model(ModelError::EmbedTooLarge(overflow))) } |