diff options
| author | Mishio595 <[email protected]> | 2018-07-24 16:33:55 -0600 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-09-16 11:38:54 -0600 |
| commit | 11d24fc262077b92aba319b8538dfcc63f585fa2 (patch) | |
| tree | 6be0bcdda08e919a6a286b93fe8bc367b3127bfe /src/utils | |
| parent | Old message is optionally passed with message_update event (diff) | |
| download | serenity-11d24fc262077b92aba319b8538dfcc63f585fa2.tar.xz serenity-11d24fc262077b92aba319b8538dfcc63f585fa2.zip | |
add method Colour::hex
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/colour.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/colour.rs b/src/utils/colour.rs index a678a32..fc50f22 100644 --- a/src/utils/colour.rs +++ b/src/utils/colour.rs @@ -201,11 +201,9 @@ impl Colour { /// ```rust /// use serenity::utils::Colour; /// - /// assert_eq!(Colour::new(6573123).hex(), "644C43"); + /// assert_eq!(Colour::new(6573123).hex(), String::from("644C43")); /// ``` - pub fn hex(&self) -> String { - format!("{:06X}", self.0) - } + pub fn hex(&self) -> String { format!("{:06X}", self.0) } } impl From<i32> for Colour { |