From 1ad2db39605f4869914abf0efa19246962ac3c92 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Wed, 6 Nov 2019 19:47:45 -0500 Subject: [PATCH] suggest inlining Harrogate render helper --- house/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/house/src/lib.rs b/house/src/lib.rs index e8e9901..b0fe051 100644 --- a/house/src/lib.rs +++ b/house/src/lib.rs @@ -16,6 +16,7 @@ pub struct Harrogate { pub porch_front: PF, } +#[inline] fn white_balance(HardwareRgb(r, g, b): HardwareRgb, white: Rgb) -> HardwareRgb { let Rgb(r, g, b) = Rgb(r, g, b) * white; HardwareRgb(r, g, b) @@ -26,6 +27,7 @@ where PB: IntoIterator, PF: IntoIterator, { + #[inline] pub fn render_to>(self, lights: &mut L) { let mut buffer = [HardwareRgb(255,0,255); PORCH_BACK_LEN + PORCH_FRONT_LEN];