From 53359f713810ed69fa1752dd1e64743d77993f2a Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 8 Jun 2026 10:03:49 +0200 Subject: [PATCH] Remove cbor-smol re-export Renaming cbor-smol to serde is confusing and the re-export is not necessary as the cbor-smol version is an implementation detail. Fixes: https://github.com/trussed-dev/ctap-types/issues/69 --- CHANGELOG.md | 1 + src/ctap2/client_pin.rs | 2 +- src/lib.rs | 1 - tests/bennofs.rs | 2 +- tests/get_assertion.rs | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045823d..faf3150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [Unreleased]: https://github.com/trussed-dev/ctap-types/compare/0.6.0-rc.4...HEAD - Remove unused `Rpc` trait. +- Remove `cbor-smol` re-export as `serde`. ## [0.6.0-rc.4] 2026-06-01 diff --git a/src/ctap2/client_pin.rs b/src/ctap2/client_pin.rs index d77e932..c21c1f0 100644 --- a/src/ctap2/client_pin.rs +++ b/src/ctap2/client_pin.rs @@ -512,7 +512,7 @@ mod tests { // The following test would then fail, as [1] != [2] let mut buf = [0u8; 64]; let example = PinV1Subcommand::GetKeyAgreement; - let ser = crate::serde::cbor_serialize(&example, &mut buf).unwrap(); + let ser = cbor_smol::cbor_serialize(&example, &mut buf).unwrap(); assert_eq!(ser, &[0x02]); } } diff --git a/src/lib.rs b/src/lib.rs index de1fa6f..a7e33bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,6 @@ pub mod authenticator; pub mod ctap1; pub mod ctap2; pub(crate) mod operation; -pub use cbor_smol as serde; pub mod sizes; #[cfg(test)] mod test; diff --git a/tests/bennofs.rs b/tests/bennofs.rs index 1034ff4..1c8bdc8 100644 --- a/tests/bennofs.rs +++ b/tests/bennofs.rs @@ -1,4 +1,4 @@ -use ctap_types::serde::{cbor_deserialize, cbor_serialize}; +use cbor_smol::{cbor_deserialize, cbor_serialize}; use serde::{Deserialize, Serialize}; #[derive(Debug, PartialEq, Serialize, Deserialize)] diff --git a/tests/get_assertion.rs b/tests/get_assertion.rs index 51a58fc..0d25b38 100644 --- a/tests/get_assertion.rs +++ b/tests/get_assertion.rs @@ -1,5 +1,5 @@ fn test<'data, T: serde::Deserialize<'data> + std::fmt::Debug>(data: &'data [u8]) { - let result = ctap_types::serde::cbor_deserialize::(data); + let result = cbor_smol::cbor_deserialize::(data); assert!(result.is_ok(), "{:?}", result); }