From 01150793931bdb33c0a8147975e0ab521a40b247 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Mon, 29 Apr 2024 03:45:11 +0200 Subject: [PATCH] Fixed spelling mistakes --- google-home/src/device.rs | 2 +- google-home/src/{fullfillment.rs => fulfillment.rs} | 6 +++--- google-home/src/lib.rs | 4 ++-- src/devices/ikea_outlet.rs | 2 +- src/devices/ntfy.rs | 2 +- src/devices/washer.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename google-home/src/{fullfillment.rs => fulfillment.rs} (99%) diff --git a/google-home/src/device.rs b/google-home/src/device.rs index 6677905..169a89f 100644 --- a/google-home/src/device.rs +++ b/google-home/src/device.rs @@ -49,7 +49,7 @@ pub trait GoogleHomeDevice: AsGoogleHomeDevice + Sync + Send + 'static { fn get_id(&self) -> String; fn is_online(&self) -> bool; - // Default values that can optionally be overriden + // Default values that can optionally be overridden fn will_report_state(&self) -> bool { false } diff --git a/google-home/src/fullfillment.rs b/google-home/src/fulfillment.rs similarity index 99% rename from google-home/src/fullfillment.rs rename to google-home/src/fulfillment.rs index 88c9699..2bf4b46 100644 --- a/google-home/src/fullfillment.rs +++ b/google-home/src/fulfillment.rs @@ -17,7 +17,7 @@ pub struct GoogleHome { } #[derive(Debug, Error)] -pub enum FullfillmentError { +pub enum FulfillmentError { #[error("Expected at least one ResponsePayload")] ExpectedOnePayload, } @@ -33,7 +33,7 @@ impl GoogleHome { &self, request: Request, devices: &HashMap>>>, - ) -> Result { + ) -> Result { // TODO: What do we do if we actually get more then one thing in the input array, right now // we only respond to the first thing let intent = request.inputs.into_iter().next(); @@ -54,7 +54,7 @@ impl GoogleHome { payload .await - .ok_or(FullfillmentError::ExpectedOnePayload) + .ok_or(FulfillmentError::ExpectedOnePayload) .map(|payload| Response::new(&request.request_id, payload)) } diff --git a/google-home/src/lib.rs b/google-home/src/lib.rs index 9a97344..fac30fe 100644 --- a/google-home/src/lib.rs +++ b/google-home/src/lib.rs @@ -2,7 +2,7 @@ #![feature(specialization)] #![feature(let_chains)] pub mod device; -mod fullfillment; +mod fulfillment; mod request; mod response; @@ -13,6 +13,6 @@ pub mod traits; pub mod types; pub use device::GoogleHomeDevice; -pub use fullfillment::{FullfillmentError, GoogleHome}; +pub use fulfillment::{FulfillmentError, GoogleHome}; pub use request::Request; pub use response::Response; diff --git a/src/devices/ikea_outlet.rs b/src/devices/ikea_outlet.rs index f20fc5d..3330d9c 100644 --- a/src/devices/ikea_outlet.rs +++ b/src/devices/ikea_outlet.rs @@ -233,7 +233,7 @@ impl crate::traits::Timeout for IkeaOutlet { tokio::time::sleep(timeout).await; debug!(id, "Turning outlet off!"); // TODO: Idealy we would call self.set_on(false), however since we want to do - // it after a timeout we have to put it in a seperate task. + // it after a timeout we have to put it in a separate task. // I don't think we can really get around calling outside function set_on(client, &topic, false).await; })); diff --git a/src/devices/ntfy.rs b/src/devices/ntfy.rs index e9a6f94..6d5d5af 100644 --- a/src/devices/ntfy.rs +++ b/src/devices/ntfy.rs @@ -154,7 +154,7 @@ impl Ntfy { .await; if let Err(err) = res { - error!("Something went wrong while sending the notifcation: {err}"); + error!("Something went wrong while sending the notification: {err}"); } else if let Ok(res) = res { let status = res.status(); if !status.is_success() { diff --git a/src/devices/washer.rs b/src/devices/washer.rs index 29bc4cb..c27d8a0 100644 --- a/src/devices/washer.rs +++ b/src/devices/washer.rs @@ -54,7 +54,7 @@ impl Device for Washer { } } -// The washer needs to have a power draw above the theshold multiple times before the washer is +// The washer needs to have a power draw above the threshold multiple times before the washer is // actually marked as running // This helps prevent false positives const HYSTERESIS: isize = 10;