From f417dd4e54a652616a10d7601b65c55d99755124 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Thu, 11 May 2023 13:51:38 -0500 Subject: [PATCH] feat: bump toad-array (#347) * fix: bump array * wip * wip * feat: bump toad-array * fix: this is ok --- Cargo.lock | 14 ++++++++++++-- toad-msg/Cargo.toml | 2 +- toad-msg/src/msg/mod.rs | 4 ++-- toad-msg/src/msg/opt/mod.rs | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e01a08c..a62e0cb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1063,7 +1063,17 @@ dependencies = [ [[package]] name = "toad-array" -version = "0.7.0" +version = "0.8.0" +dependencies = [ + "tinyvec", + "toad-len 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "toad-array" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90c89c65763a9ed217a09ea4f43615153e9bccf82f972f3e5914ded7f5658fe6" dependencies = [ "tinyvec", "toad-len 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1185,7 +1195,7 @@ dependencies = [ "heapless", "itertools", "tinyvec", - "toad-array 0.2.3", + "toad-array 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "toad-cursor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "toad-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "toad-len 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/toad-msg/Cargo.toml b/toad-msg/Cargo.toml index 7e3fc4b5..3bb436f7 100644 --- a/toad-msg/Cargo.toml +++ b/toad-msg/Cargo.toml @@ -51,7 +51,7 @@ toad-macros = "0.2.0" blake2 = "0.10" toad-map = {version = "0.2.3", default_features = false} toad-len = {version = "0.1.3", default_features = false} -toad-array = {version = "0.2.3", default_features = false} +toad-array = {version = "0.8.0", default_features = false} toad-cursor = {version = "0.2.0", default_features = false} toad-hash = {version = "0.3.0", default_features = false} diff --git a/toad-msg/src/msg/mod.rs b/toad-msg/src/msg/mod.rs index a5e1abc4..48889e74 100644 --- a/toad-msg/src/msg/mod.rs +++ b/toad-msg/src/msg/mod.rs @@ -3,7 +3,7 @@ use core::hash::Hash; use core::iter::FromIterator; use core::str::{from_utf8, Utf8Error}; -use toad_array::{AppendCopy, Array}; +use toad_array::{AppendCopy, Array, Indexed}; use toad_cursor::Cursor; use toad_len::Len; use toad_macros::rfc_7252_doc; @@ -870,7 +870,7 @@ impl + AppendCopy, Options: OptionMap> | (vals, _) if vals.is_full() => Err(SetOptionError::RepeatedTooManyTimes(v)), | (vals, opts) if opts.is_full() => Err(SetOptionError::TooManyOptions(n, vals)), | (mut vals, opts) => { - vals.push(v); + vals.append(v); opts.insert(n, vals).ok(); Ok(()) }, diff --git a/toad-msg/src/msg/opt/mod.rs b/toad-msg/src/msg/opt/mod.rs index 2c8cb7c2..be981746 100644 --- a/toad-msg/src/msg/opt/mod.rs +++ b/toad-msg/src/msg/opt/mod.rs @@ -6,7 +6,7 @@ use core::ops::{Add, Sub}; #[cfg(feature = "alloc")] use std_alloc::vec::Vec; use tinyvec::ArrayVec; -use toad_array::{AppendCopy, Array}; +use toad_array::{AppendCopy, Array, Indexed}; use toad_cursor::Cursor; use toad_len::Len; use toad_macros::rfc_7252_doc;