aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorMishio595 <[email protected]>2018-07-24 16:33:55 -0600
committerMishio595 <[email protected]>2018-09-16 11:38:54 -0600
commit11d24fc262077b92aba319b8538dfcc63f585fa2 (patch)
tree6be0bcdda08e919a6a286b93fe8bc367b3127bfe /src/utils
parentOld message is optionally passed with message_update event (diff)
downloadserenity-11d24fc262077b92aba319b8538dfcc63f585fa2.tar.xz
serenity-11d24fc262077b92aba319b8538dfcc63f585fa2.zip
add method Colour::hex
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/colour.rs6
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 {