Closed dmitmel closed 6 years ago
I've also defined a macro called define_colour, it can be used like this:
define_colour
// The colour struct should be available in the current scope for this macro to work! use graphics::colour::Colour; define_colour!(SOMETHING, 1, 2, 3);
And it will generate the following code:
const SOMETHING: Colour = Colour { r: 1, g: 2, b: 3 };
@Hopson97 I'll rebase this branch onto master
master
@Hopson97 Done, this branch now can be safely merged
I've also defined a macro called
define_colour
, it can be used like this:And it will generate the following code: