Skip to content

Commit

Permalink
clippy & fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
UMR1352 committed Jan 17, 2025
1 parent 0a3131f commit 2703d06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bindings/wasm/src/sd_jwt_vc/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ impl WasmSdJwtVc {
pub fn vct_to_url(resource: &str) -> Option<String> {
let url = resource.parse::<Url>().ok()?;
vct_to_url_impl(&url).map(|url| url.to_string())
}
}
4 changes: 2 additions & 2 deletions identity_document/benches/deserialize_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(|| {
Expand Down
5 changes: 1 addition & 4 deletions identity_iota_core/src/state_metadata/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 2703d06

Please sign in to comment.