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/utils | |
| parent | Add env_logger bot example (diff) | |
| download | serenity-483b069cc0c821ec673ac475b168809e3a41525a.tar.xz serenity-483b069cc0c821ec673ac475b168809e3a41525a.zip | |
Fix clippy lints
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/colour.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/colour.rs b/src/utils/colour.rs index 72df2e9..4e612cc 100644 --- a/src/utils/colour.rs +++ b/src/utils/colour.rs @@ -125,9 +125,9 @@ impl Colour { /// assert_eq!(colour.tuple(), (217, 45, 215)); /// ``` pub fn from_rgb(r: u8, g: u8, b: u8) -> Colour { - let mut uint = r as u32; - uint = (uint << 8) | (g as u32); - uint = (uint << 8) | (b as u32); + let mut uint = u32::from(r); + uint = (uint << 8) | (u32::from(g)); + uint = (uint << 8) | (u32::from(b)); Colour(uint) } |