diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-11-21 16:46:25 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-11-21 16:46:25 -0700 |
| commit | 6936dc8c1222a84f46b910a1907ff7fc7689b886 (patch) | |
| tree | 34e539649f049d18b921152bb7dace496ff1e920 /src/module.rs | |
| parent | bfd0d9e48acdbca5758b0d64c3d30f06f008a3b9 (diff) | |
the envsys facility is fully passed through to the battery module now
yay!!!! Force-Push: yes Change-Id: I2b1a0ca9858edc0b5d25d6268282fe3a90b99de5
Diffstat (limited to 'src/module.rs')
| -rw-r--r-- | src/module.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Self>; + fn new(facilities: &mut FacilityMap) -> Result<Self>; /* The only way to coerce to dyn is to return as it! */ fn as_box<'a>(self) -> Box<dyn Module + 'a> @@ -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<String>; fn sleep_duration(&self) -> Option<Duration>; } |