From 6818ab7da765e6cf7b7bb7e87b03804de65a9996 Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Wed, 3 Jan 2024 16:34:28 -0500 Subject: [PATCH] fix: clippy --- cmd/crates/soroban-spec-tools/src/lib.rs | 4 ++-- cmd/crates/soroban-spec-typescript/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/crates/soroban-spec-tools/src/lib.rs b/cmd/crates/soroban-spec-tools/src/lib.rs index e7b72d1b07..7f310fd996 100644 --- a/cmd/crates/soroban-spec-tools/src/lib.rs +++ b/cmd/crates/soroban-spec-tools/src/lib.rs @@ -386,7 +386,7 @@ impl Spec { let val = self.from_json(v, &f.type_)?; let key = StringM::from_str(name).unwrap(); Ok(ScMapEntry { - key: ScVal::Symbol(key.try_into()?), + key: ScVal::Symbol(key.into()), val, }) }) @@ -1135,7 +1135,7 @@ impl Spec { match self.find(&name.to_utf8_string_lossy()).ok()? { ScSpecEntry::UdtStructV0(ScSpecUdtStructV0 { fields, .. }) if fields - .get(0) + .first() .map(|f| f.name.to_utf8_string_lossy() == "0") .unwrap_or_default() => { diff --git a/cmd/crates/soroban-spec-typescript/src/lib.rs b/cmd/crates/soroban-spec-typescript/src/lib.rs index 4225b8aab7..790f43b071 100644 --- a/cmd/crates/soroban-spec-typescript/src/lib.rs +++ b/cmd/crates/soroban-spec-typescript/src/lib.rs @@ -182,7 +182,7 @@ pub fn entry_to_parser(entry: &Entry) -> Option<(String, String)> { } let output = outputs - .get(0) + .first() .map(|_| format!("this.spec.funcResToNative(\"{name}\", result)")) .unwrap_or_default(); let parse_result_xdr = if return_type == "void" {