Fixed spelling mistakes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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<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
|
||||
// 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))
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user