@@ -135,17 +135,13 @@ fn verify_status(version: Version, test_output: Option<&String>) -> Result<()> {
135135 let out =
136136 Method :: from_name ( version, & method. name ) . expect ( "guaranteed by methods_and_status()" ) ;
137137
138- if !versioned:: requires_type ( version, & method. name ) ? {
139- if versioned:: type_exists ( version, & method. name ) ? {
140- eprintln ! ( "return type found but method is omitted or TODO: {}" , output_method( out) ) ;
141- }
142- }
143- if !model:: requires_type ( version, & method. name ) ? {
144- if model:: type_exists ( version, & method. name ) ? {
145- eprintln ! ( "model type found but method is omitted or TODO: {}" , output_method( out) ) ;
146- }
138+ if versioned:: type_exists ( version, & method. name ) ? && !versioned:: requires_type ( version, & method. name ) ? {
139+ eprintln ! ( "return type found but method is omitted or TODO: {}" , output_method( out) ) ;
147140 }
148141
142+ if model:: type_exists ( version, & method. name ) ? && !model:: requires_type ( version, & method. name ) ? {
143+ eprintln ! ( "model type found but method is omitted or TODO: {}" , output_method( out) ) ;
144+ }
149145 }
150146 }
151147 }
@@ -156,19 +152,14 @@ fn verify_status(version: Version, test_output: Option<&String>) -> Result<()> {
156152fn check_types_exist_if_required ( version : Version , method_name : & str ) -> Result < ( ) > {
157153 let out = Method :: from_name ( version, method_name) . expect ( "guaranteed by methods_and_status()" ) ;
158154
159- if versioned:: requires_type ( version, method_name) ? {
160- if !versioned:: type_exists ( version, method_name) ? {
161- eprintln ! ( "missing return type: {}" , output_method( out) ) ;
162- }
155+ if versioned:: requires_type ( version, method_name) ? && !versioned:: type_exists ( version, method_name) ? {
156+ eprintln ! ( "missing return type: {}" , output_method( out) ) ;
163157 }
164- if model:: requires_type ( version, method_name) ? {
165- if !model:: type_exists ( version, method_name) ? {
166- eprintln ! ( "missing model type: {}" , output_method( out) ) ;
167- }
168- } else {
169- if model:: type_exists ( version, method_name) ? {
170- eprintln ! ( "found model type when none expected: {}" , output_method( out) ) ;
171- }
158+ if model:: requires_type ( version, method_name) ? && !model:: type_exists ( version, method_name) ? {
159+ eprintln ! ( "missing model type: {}" , output_method( out) ) ;
160+ }
161+ if model:: type_exists ( version, method_name) ? && !model:: requires_type ( version, method_name) ? {
162+ eprintln ! ( "found model type when none expected: {}" , output_method( out) ) ;
172163 }
173164 Ok ( ( ) )
174165}
0 commit comments