@@ -41,6 +41,7 @@ enum WrapperParamKind {
4141 SliceArgs ,
4242}
4343
44+ #[ allow( clippy:: enum_variant_names) ]
4445#[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
4546pub ( crate ) enum HostBindingKind {
4647 StaticStack ,
@@ -217,12 +218,11 @@ pub(crate) fn classify_host_binding(function: &ItemFn) -> HostBindingKind {
217218 ) {
218219 return HostBindingKind :: StaticArgs ;
219220 }
220- if let Some ( inner ) = sole_type_argument ( & return_type, "VmResult" )
221+ if sole_type_argument ( & return_type, "VmResult" )
221222 . or_else ( || sole_type_argument ( & return_type, "HostResult" ) )
223+ . is_some_and ( |inner| matches ! ( plain_path_type( & inner) . as_deref( ) , Some ( "CallOutcome" ) ) )
222224 {
223- if matches ! ( plain_path_type( & inner) . as_deref( ) , Some ( "CallOutcome" ) ) {
224- return HostBindingKind :: StaticArgs ;
225- }
225+ return HostBindingKind :: StaticArgs ;
226226 }
227227 if is_supported_ordinary_return_type ( & return_type) {
228228 return HostBindingKind :: StaticNonYieldingArgs ;
@@ -250,7 +250,7 @@ fn is_supported_ordinary_return_type(ty: &Type) -> bool {
250250 syn:: GenericArgument :: Type ( inner) => Some ( inner) ,
251251 _ => None ,
252252 } )
253- . is_some_and ( |inner| is_supported_ordinary_return_type ( inner ) )
253+ . is_some_and ( is_supported_ordinary_return_type)
254254 }
255255 _ => true ,
256256 } )
0 commit comments