Fixed spelling mistakes

This commit is contained in:
Dreaded_X 2024-04-29 03:45:11 +02:00
parent 96f260492b
commit b16f2ae420
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
6 changed files with 9 additions and 9 deletions

View File

@ -49,7 +49,7 @@ pub trait GoogleHomeDevice: AsGoogleHomeDevice + Sync + Send + 'static {
fn get_id(&self) -> String; fn get_id(&self) -> String;
fn is_online(&self) -> bool; 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 { fn will_report_state(&self) -> bool {
false false
} }

View File

@ -17,7 +17,7 @@ pub struct GoogleHome {
} }
#[derive(Debug, Error)] #[derive(Debug, Error)]
pub enum FullfillmentError { pub enum FulfillmentError {
#[error("Expected at least one ResponsePayload")] #[error("Expected at least one ResponsePayload")]
ExpectedOnePayload, ExpectedOnePayload,
} }
@ -33,7 +33,7 @@ impl GoogleHome {
&self, &self,
request: Request, request: Request,
devices: &HashMap<String, Arc<RwLock<Box<T>>>>, devices: &HashMap<String, Arc<RwLock<Box<T>>>>,
) -> Result<Response, FullfillmentError> { ) -> Result<Response, FulfillmentError> {
// TODO: What do we do if we actually get more then one thing in the input array, right now // 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 // we only respond to the first thing
let intent = request.inputs.into_iter().next(); let intent = request.inputs.into_iter().next();
@ -54,7 +54,7 @@ impl GoogleHome {
payload payload
.await .await
.ok_or(FullfillmentError::ExpectedOnePayload) .ok_or(FulfillmentError::ExpectedOnePayload)
.map(|payload| Response::new(&request.request_id, payload)) .map(|payload| Response::new(&request.request_id, payload))
} }

View File

@ -2,7 +2,7 @@
#![feature(specialization)] #![feature(specialization)]
#![feature(let_chains)] #![feature(let_chains)]
pub mod device; pub mod device;
mod fullfillment; mod fulfillment;
mod request; mod request;
mod response; mod response;
@ -13,6 +13,6 @@ pub mod traits;
pub mod types; pub mod types;
pub use device::GoogleHomeDevice; pub use device::GoogleHomeDevice;
pub use fullfillment::{FullfillmentError, GoogleHome}; pub use fulfillment::{FulfillmentError, GoogleHome};
pub use request::Request; pub use request::Request;
pub use response::Response; pub use response::Response;

View File

@ -233,7 +233,7 @@ impl crate::traits::Timeout for IkeaOutlet {
tokio::time::sleep(timeout).await; tokio::time::sleep(timeout).await;
debug!(id, "Turning outlet off!"); debug!(id, "Turning outlet off!");
// TODO: Idealy we would call self.set_on(false), however since we want to do // 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 // I don't think we can really get around calling outside function
set_on(client, &topic, false).await; set_on(client, &topic, false).await;
})); }));

View File

@ -154,7 +154,7 @@ impl Ntfy {
.await; .await;
if let Err(err) = res { 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 { } else if let Ok(res) = res {
let status = res.status(); let status = res.status();
if !status.is_success() { if !status.is_success() {

View File

@ -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 // actually marked as running
// This helps prevent false positives // This helps prevent false positives
const HYSTERESIS: isize = 10; const HYSTERESIS: isize = 10;