Update to rust 1.89 and edition 2024
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "google_home"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use automation_cast::Cast;
|
||||
use futures::future::{join_all, OptionFuture};
|
||||
use futures::future::{OptionFuture, join_all};
|
||||
use thiserror::Error;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::Device;
|
||||
use crate::errors::{DeviceError, ErrorCode};
|
||||
use crate::request::{self, Intent, Request};
|
||||
use crate::response::{self, execute, query, sync, Response, ResponsePayload};
|
||||
use crate::Device;
|
||||
use crate::response::{self, Response, ResponsePayload, execute, query, sync};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GoogleHome {
|
||||
@@ -64,7 +64,7 @@ impl GoogleHome {
|
||||
devices: &HashMap<String, Box<T>>,
|
||||
) -> sync::Payload {
|
||||
let mut resp_payload = sync::Payload::new(&self.user_id);
|
||||
let f = devices.iter().map(|(_, device)| async move {
|
||||
let f = devices.values().map(|device| async move {
|
||||
if let Some(device) = device.as_ref().cast() {
|
||||
Some(Device::sync(device).await)
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(specialization)]
|
||||
#![feature(let_chains)]
|
||||
pub mod device;
|
||||
mod fulfillment;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ use automation_cast::Cast;
|
||||
use google_home_macro::traits;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::errors::ErrorCode;
|
||||
use crate::Device;
|
||||
use crate::errors::ErrorCode;
|
||||
|
||||
traits! {
|
||||
Device,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "google_home_macro"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#![feature(let_chains)]
|
||||
#![feature(iter_intersperse)]
|
||||
use proc_macro::TokenStream;
|
||||
use quote::quote;
|
||||
@@ -6,8 +5,8 @@ use syn::parse::Parse;
|
||||
use syn::punctuated::Punctuated;
|
||||
use syn::token::Brace;
|
||||
use syn::{
|
||||
braced, parse_macro_input, GenericArgument, Ident, LitStr, Path, PathArguments, PathSegment,
|
||||
ReturnType, Signature, Token, Type, TypePath,
|
||||
GenericArgument, Ident, LitStr, Path, PathArguments, PathSegment, ReturnType, Signature, Token,
|
||||
Type, TypePath, braced, parse_macro_input,
|
||||
};
|
||||
|
||||
mod kw {
|
||||
|
||||
Reference in New Issue
Block a user