From 6936dc8c1222a84f46b910a1907ff7fc7689b886 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 21 Nov 2026 16:46:25 -0700 Subject: the envsys facility is fully passed through to the battery module now yay!!!! Force-Push: yes Change-Id: I2b1a0ca9858edc0b5d25d6268282fe3a90b99de5 --- src/module.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/module.rs') diff --git a/src/module.rs b/src/module.rs index 9d4baa0..6074457 100644 --- a/src/module.rs +++ b/src/module.rs @@ -1,5 +1,5 @@ use crate::error::Result; -use crate::facility::FacilityType; +use crate::facility::{ FacilityMap, FacilityType }; use std::time::Duration; @@ -17,7 +17,7 @@ pub mod time; pub trait CreatableModule: Module + Sized { const REQUIRED_FACILITIES: FacilityType; - fn new() -> Result; + fn new(facilities: &mut FacilityMap) -> Result; /* The only way to coerce to dyn is to return as it! */ fn as_box<'a>(self) -> Box @@ -28,7 +28,7 @@ pub trait CreatableModule: Module + Sized { } pub trait Module { - fn format(&mut self) -> String; + fn format(&mut self, facilities: &mut FacilityMap) -> Result; fn sleep_duration(&self) -> Option; } -- cgit 1.4.1