aboutsummaryrefslogtreecommitdiff
path: root/src/utils/builder
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-13 03:57:12 -0800
committerAustin Hellyer <[email protected]>2017-01-13 09:17:05 -0800
commita8acd6138741a6e5268141ac4ce902561931d353 (patch)
treef3cc01856d84bb34feca0695775b32208fb6ad9f /src/utils/builder
parentFix build (diff)
downloadserenity-a8acd6138741a6e5268141ac4ce902561931d353.tar.xz
serenity-a8acd6138741a6e5268141ac4ce902561931d353.zip
Convert Colour to be a tuple struct
The struct only has one field (`value`) anyway.
Diffstat (limited to 'src/utils/builder')
-rw-r--r--src/utils/builder/create_embed.rs2
-rw-r--r--src/utils/builder/edit_role.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/builder/create_embed.rs b/src/utils/builder/create_embed.rs
index d33db8a..86d5b11 100644
--- a/src/utils/builder/create_embed.rs
+++ b/src/utils/builder/create_embed.rs
@@ -63,7 +63,7 @@ impl CreateEmbed {
/// Set the colour of the left-hand side of the embed.
pub fn colour<C: Into<Colour>>(mut self, colour: C) -> Self {
- self.0.insert("color".to_owned(), Value::U64(colour.into().value as u64));
+ self.0.insert("color".to_owned(), Value::U64(colour.into().0 as u64));
CreateEmbed(self.0)
}
diff --git a/src/utils/builder/edit_role.rs b/src/utils/builder/edit_role.rs
index b4be6d4..cea0c75 100644
--- a/src/utils/builder/edit_role.rs
+++ b/src/utils/builder/edit_role.rs
@@ -37,7 +37,7 @@ impl EditRole {
/// Creates a new builder with the values of the given [`Role`].
pub fn new(role: &Role) -> Self {
EditRole(ObjectBuilder::new()
- .insert("color", role.colour.value)
+ .insert("color", role.colour.0)
.insert("hoist", role.hoist)
.insert("managed", role.managed)
.insert("mentionable", role.mentionable)