Skip to content

Commit 1c79018

Browse files
hugoclrdkantai
andauthored
refactor: addess review
Co-authored-by: Aaron Blankstein <[email protected]>
1 parent e7bd86c commit 1c79018

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clarity/src/vm/types/signatures.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,11 +1655,10 @@ impl TypeSignature {
16551655
epoch: StacksEpochId,
16561656
clarity_version: ClarityVersion,
16571657
) -> Result<BTreeMap<ClarityName, FunctionSignature>> {
1658-
if type_args.is_empty() {
1659-
return Err(CheckErrors::InvalidTypeDescription);
1660-
}
16611658
let mut trait_signature: BTreeMap<ClarityName, FunctionSignature> = BTreeMap::new();
1662-
let functions_types = type_args[0]
1659+
let functions_types = type_args
1660+
.get(0)
1661+
.ok_or_else(|| CheckErrors::InvalidTypeDescription)?
16631662
.match_list()
16641663
.ok_or(CheckErrors::DefineTraitBadSignature)?;
16651664

0 commit comments

Comments
 (0)