From 80124967ab590e8f78e98419ed47cc72b8e1bdd1 Mon Sep 17 00:00:00 2001 From: gallant Date: Thu, 27 Jul 2023 15:00:46 -0500 Subject: [PATCH] oh dear --- src/backend/logger.rs | 6 +++++- src/backend/mod.rs | 2 +- src/input.rs | 14 ++++++++------ src/main.rs | 4 ++-- src/state.rs | 14 ++++++-------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/backend/logger.rs b/src/backend/logger.rs index 9481656..94736d2 100644 --- a/src/backend/logger.rs +++ b/src/backend/logger.rs @@ -9,7 +9,11 @@ lazy_static! { }; } -use std::{io::{BufWriter, Write}, fs::File, sync::Mutex}; +use std::{ + fs::File, + io::{BufWriter, Write}, + sync::Mutex, +}; pub fn log(entry: &str) { let mut log = LOG_FILE.lock().unwrap(); diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 7204c8c..d991728 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -1 +1 @@ -pub mod logger; \ No newline at end of file +pub mod logger; diff --git a/src/input.rs b/src/input.rs index 7d206b8..d0aa06b 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1,12 +1,14 @@ -use crate::state::*; +use crate::state::Waycrab; use smithay::backend::input::{ - InputBackend + * }; -impl InputBackend for Waycrab{} +use std::error::Error; + +impl InputBackend for Waycrab{ fn dispatch_new_events( &mut self, - callback: F) -> Result<(),InputBackend::EventError>{ - - } + callback: F) -> Result<(),Self::EventError>{ + Ok(()) + } } diff --git a/src/main.rs b/src/main.rs index a8f74e4..3c7143c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ - - mod backend; +mod state; +mod input; fn main() { println!("Hello, world!"); diff --git a/src/state.rs b/src/state.rs index 20b316b..212d2a8 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,14 +1,12 @@ #[derive(Debug)] -struct Waycrab { - uptime: std::time::Instant +pub struct Waycrab { + uptime: std::time::Instant, } -impl Waycrab{ - pub fn new() -> Self - { +impl Waycrab { + pub fn new() -> Self { Waycrab { - uptime: std::time::Instant::now() - - } + uptime: std::time::Instant::now(), + } } }