From ad68133af6fe24e536eff2d4a8da8d15aea4cc47 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 21 Oct 2024 23:11:01 +0200 Subject: [PATCH] fixup! Update cbor-smol to v0.5.0 --- Cargo.toml | 2 +- src/ctap2.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a583ad2..186359b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/trussed-dev/ctap-types" [dependencies] arbitrary = { version = "1.3.2", features = ["derive"], optional = true } bitflags = "1.3" -cbor-smol = { version = "0.5", features = ["heapless-bytes-v0-3"] } +cbor-smol = { version = "0.5", features = ["heapless-v0-7"] } cosey = "0.3.1" delog = "0.1" heapless = { version = "0.7", default-features = false, features = ["serde"] } diff --git a/src/ctap2.rs b/src/ctap2.rs index a701749..6e75754 100644 --- a/src/ctap2.rs +++ b/src/ctap2.rs @@ -2,6 +2,8 @@ //! //! Note that all ctap2::Authenticators automatically implement RPC with [`Request`] and //! [`Response`]. +use core::ops::DerefMut; + use bitflags::bitflags; use cbor_smol::cbor_deserialize; use serde::{Deserialize, Serialize}; @@ -242,7 +244,8 @@ impl<'a, A: SerializeAttestedCredentialData, E: serde::Serialize> AuthenticatorD // the extensions data if let Some(extensions) = self.extensions.as_ref() { - cbor_smol::cbor_serialize_to(extensions, &mut bytes).map_err(|_| Error::Other)?; + cbor_smol::cbor_serialize_to(extensions, bytes.deref_mut()) + .map_err(|_| Error::Other)?; } Ok(bytes)