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/utils | |
| 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/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) } |