diff --git a/src/main.rs b/src/main.rs index ed60ccf..c1e41b8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,8 +25,8 @@ mod signalk; mod vesseldata; use vesseldata::VesselDataEventSource; -pub struct HelmsDisplay { - font: Font<'static>, +pub struct HelmsDisplay<'a> { + font: Font<'a>, boat: forms::Form, compassrose: forms::Form, cog: forms::Form, @@ -36,9 +36,9 @@ pub struct HelmsDisplay { course_screen: forms::Screen, } -impl HelmsDisplay { +impl<'a> HelmsDisplay<'a> { - pub fn new() -> HelmsDisplay { + pub fn new() -> HelmsDisplay<'a> { // in the future, this method should probably take some sort of // configuration object. let mut loader = forms::Loader::new("/root/helms-display".to_string());