Skip to content

Commit

Permalink
fixup! Update cbor-smol to v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Oct 24, 2024
1 parent e0f464c commit 23f8272
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/apps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ mod tests {
#[cfg(feature = "piv-authenticator")]
use super::PivConfig;
use super::{Config, FidoConfig, OpcardConfig};
use cbor_smol::cbor_serialize_bytes;
use cbor_smol::cbor_serialize;

#[test]
fn test_config_size() {
Expand All @@ -1201,10 +1201,11 @@ mod tests {
piv: PivConfig { disabled: true },
fs_version: 1,
};
let data: heapless_bytes::Bytes<1024> = cbor_serialize_bytes(&config).unwrap();
let mut buffer = [0; 1024];
let data = cbor_serialize(&config, &mut buffer).unwrap();
// littlefs2 is most efficient with files < 1/4 of the block size. The block sizes are 512
// bytes for LPC55 and 256 bytes for NRF52. As the block count is only problematic on the
// LPC55, this could be increased to 128 if necessary.
assert!(data.len() < 64, "{}: {}", data.len(), hex::encode(&data));
assert!(data.len() < 64, "{}: {}", data.len(), hex::encode(data));
}
}

0 comments on commit 23f8272

Please sign in to comment.