diff --git a/bindings/wasm/src/sd_jwt_vc/token.rs b/bindings/wasm/src/sd_jwt_vc/token.rs index 9890aa59d2..c5219773f6 100644 --- a/bindings/wasm/src/sd_jwt_vc/token.rs +++ b/bindings/wasm/src/sd_jwt_vc/token.rs @@ -169,4 +169,4 @@ impl WasmSdJwtVc { pub fn vct_to_url(resource: &str) -> Option { let url = resource.parse::().ok()?; vct_to_url_impl(&url).map(|url| url.to_string()) -} \ No newline at end of file +} diff --git a/identity_document/benches/deserialize_document.rs b/identity_document/benches/deserialize_document.rs index 1bd26ce870..0b5203b83c 100644 --- a/identity_document/benches/deserialize_document.rs +++ b/identity_document/benches/deserialize_document.rs @@ -220,9 +220,9 @@ fn deserialize_json_document(c: &mut Criterion) { (JSON_DOC_DID_KEY, "did:key document"), (JSON_DOCUMENT_LARGE, "large document"), ] { - group.throughput(Throughput::Bytes(json.as_bytes().len() as u64)); + group.throughput(Throughput::Bytes(json.len() as u64)); group.bench_with_input( - BenchmarkId::from_parameter(format!("{name}, document size: {} bytes", json.as_bytes().len())), + BenchmarkId::from_parameter(format!("{name}, document size: {} bytes", json.len())), json, |b, json| { b.iter(|| { diff --git a/identity_iota_core/src/state_metadata/document.rs b/identity_iota_core/src/state_metadata/document.rs index e14e381f5b..197f9befb8 100644 --- a/identity_iota_core/src/state_metadata/document.rs +++ b/identity_iota_core/src/state_metadata/document.rs @@ -424,10 +424,7 @@ mod tests { // Encoding. assert_eq!(packed[4], StateMetadataEncoding::Json as u8); // JSON length. - assert_eq!( - &packed[5..=6], - (expected_payload.as_bytes().len() as u16).to_le_bytes().as_ref() - ); + assert_eq!(&packed[5..=6], (expected_payload.len() as u16).to_le_bytes().as_ref()); // JSON payload. assert_eq!(&packed[7..], expected_payload.as_bytes()); }