Perhaps doing ownership right?

This commit is contained in:
2020-09-28 16:28:14 +00:00
parent 80fe74ead9
commit c3621a6450

View File

@@ -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());