File tree Expand file tree Collapse file tree
bon-macros/src/builder/builder_gen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,13 @@ impl<'a> GenericSettersCtx<'a> {
2626 . collect ( ) ;
2727
2828 // Check for interdependent type parameters in generic bounds
29- for param in generics. iter ( ) {
29+ for param in generics {
3030 if let syn:: GenericParam :: Type ( type_param) = param {
3131 let params_in_bounds =
3232 find_type_params_in_bounds ( & type_param. bounds , & type_param_idents) ;
3333 if params_in_bounds. len ( ) > 1
34- || ( params_in_bounds. len ( ) == 1 && params_in_bounds[ 0 ] != & type_param. ident )
34+ || ( params_in_bounds. len ( ) == 1
35+ && params_in_bounds. get ( 0 ) != Some ( & & type_param. ident ) )
3536 {
3637 let params_str = params_in_bounds
3738 . iter ( )
@@ -280,7 +281,7 @@ impl<'a> GenericSettersCtx<'a> {
280281}
281282
282283fn find_type_params_in_bounds < ' b > (
283- bounds : & syn :: punctuated :: Punctuated < syn:: TypeParamBound , syn:: token:: Plus > ,
284+ bounds : & Punctuated < syn:: TypeParamBound , syn:: token:: Plus > ,
284285 type_params : & ' b [ & ' b syn:: Ident ] ,
285286) -> Vec < & ' b syn:: Ident > {
286287 use syn:: visit:: Visit ;
You can’t perform that action at this time.
0 commit comments