From 7c9ca0d07e1badcc6cd4d48410ae983539be58c1 Mon Sep 17 00:00:00 2001 From: Henri Chataing Date: Thu, 14 Dec 2023 16:57:09 -0800 Subject: [PATCH] Update pdl-compiler version to 0.2.3 --- Cargo.lock | 19 +++++++++++++++---- Cargo.toml | 3 ++- src/device.rs | 2 +- src/lib.rs | 1 + 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f99308f..58964cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cfg-if" @@ -373,9 +373,9 @@ checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "pdl-compiler" -version = "0.1.7" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99a9ac3d6a426c6fc0b85903a16d77bf148e20ddf755361f76e230d1b6d72cf" +checksum = "d277c9e6a1869e95522f9bd532bc225f85c03434b48cd914524235910f9ccdbe" dependencies = [ "argh", "codespan-reporting", @@ -390,6 +390,16 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "pdl-runtime" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce05e0a116b0250bb41732e2858eada706aebdf311d7f832898c9256bb442abe" +dependencies = [ + "bytes", + "thiserror", +] + [[package]] name = "pest" version = "2.7.4" @@ -448,6 +458,7 @@ dependencies = [ "num-derive", "num-traits", "pdl-compiler", + "pdl-runtime", "serde", "serde_json", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 8d086a2..86009de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ default = ["web"] web = ["hyper", "tokio/rt-multi-thread"] [build-dependencies] -pdl-compiler = "0.1.6" +pdl-compiler = "0.2.3" [dependencies] tokio = { version = "1.25.0", features = [ "fs", "io-util", "macros", "net", "rt" ] } @@ -45,6 +45,7 @@ bytes = "1" anyhow = "1.0.56" num-derive = "0.4.1" num-traits = "0.2.17" +pdl-runtime = "0.2.3" thiserror = "1.0.49" glam = "0.23.0" hyper = { version = "0.14", features = ["server", "stream", "http1", "tcp"], optional = true } diff --git a/src/device.rs b/src/device.rs index fd18dc8..a83ced1 100644 --- a/src/device.rs +++ b/src/device.rs @@ -203,7 +203,7 @@ impl Device { ); let (status, parameters) = if invalid_config_status.is_empty() { - self.config.extend(valid_parameters.into_iter()); + self.config.extend(valid_parameters); (StatusCode::UciStatusOk, Vec::new()) } else { (StatusCode::UciStatusInvalidParam, invalid_config_status) diff --git a/src/lib.rs b/src/lib.rs index 796fbf5..3ee147f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ use anyhow::Result; use bytes::Bytes; +use pdl_runtime::Packet; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt::Display;