From ee48d96a02be5ec05078bbe192251857615ae428 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sat, 9 Mar 2019 17:05:10 -0500 Subject: [PATCH] Make gray const --- lights/src/rgb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lights/src/rgb.rs b/lights/src/rgb.rs index c585986..2b37c9d 100644 --- a/lights/src/rgb.rs +++ b/lights/src/rgb.rs @@ -48,7 +48,7 @@ impl core::ops::Mul for Rgb /// Construct an [Rgb] from a monochrome value. #[inline] -pub fn gray(gray: u8) -> Rgb { +pub const fn gray(gray: u8) -> Rgb { Rgb(gray, gray, gray) }