Make gray const
This commit is contained in:
parent
766f421a31
commit
ee48d96a02
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ impl core::ops::Mul<u8> for Rgb
|
||||||
|
|
||||||
/// Construct an [Rgb] from a monochrome value.
|
/// Construct an [Rgb] from a monochrome value.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn gray(gray: u8) -> Rgb {
|
pub const fn gray(gray: u8) -> Rgb {
|
||||||
Rgb(gray, gray, gray)
|
Rgb(gray, gray, gray)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue