Skip to content

Commit

Permalink
Simplify colour macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Hellyer committed Dec 1, 2016
1 parent 4a14b92 commit bb97211
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/colour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::default::Default;
use ::internal::prelude::*;

macro_rules! colour {
($struct_:ident; $(#[$attr:meta] $name:ident, $val:expr;)*) => {
impl $struct_ {
($(#[$attr:meta] $name:ident, $val:expr;)*) => {
impl Colour {
$(
#[$attr]
pub fn $name() -> Colour {
Expand Down Expand Up @@ -237,7 +237,6 @@ impl From<u64> for Colour {
}

colour! {
Colour;
/// Creates a new `Colour`, setting its RGB value to `(111, 198, 226)`.
blitz_blue, 0x6FC6E2;
/// Creates a new `Colour`, setting its RGB value to `(52, 152, 219)`.
Expand Down

0 comments on commit bb97211

Please sign in to comment.