We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7bd86c commit 1c79018Copy full SHA for 1c79018
clarity/src/vm/types/signatures.rs
@@ -1655,11 +1655,10 @@ impl TypeSignature {
1655
epoch: StacksEpochId,
1656
clarity_version: ClarityVersion,
1657
) -> Result<BTreeMap<ClarityName, FunctionSignature>> {
1658
- if type_args.is_empty() {
1659
- return Err(CheckErrors::InvalidTypeDescription);
1660
- }
1661
let mut trait_signature: BTreeMap<ClarityName, FunctionSignature> = BTreeMap::new();
1662
- let functions_types = type_args[0]
+ let functions_types = type_args
+ .get(0)
+ .ok_or_else(|| CheckErrors::InvalidTypeDescription)?
1663
.match_list()
1664
.ok_or(CheckErrors::DefineTraitBadSignature)?;
1665
0 commit comments