diff options
| author | Zeyla Hellyer <[email protected]> | 2017-10-10 21:09:17 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-11 20:59:34 -0700 |
| commit | 483b069cc0c821ec673ac475b168809e3a41525a (patch) | |
| tree | 32fc42c8c0a5d65cd81b8044dd60e9e73a26f526 /src/model/channel | |
| parent | Add env_logger bot example (diff) | |
| download | serenity-483b069cc0c821ec673ac475b168809e3a41525a.tar.xz serenity-483b069cc0c821ec673ac475b168809e3a41525a.zip | |
Fix clippy lints
Diffstat (limited to 'src/model/channel')
| -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 55f61ba..480c15d 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))) } |