File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
rocket-okapi-codegen/src/openapi_attr Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 3636 run : cargo fmt -- --check
3737 - name : Linting
3838 run : cargo clippy -- -D warnings
39- - name : Audit
40- run : |
41- cargo update
42- cargo audit
43- # Allowed to fail but this will notify us that some dependency might need an update.
44- continue-on-error : true
4539
4640 # Run code coverage
4741 - name : Run code coverage
Original file line number Diff line number Diff line change @@ -333,9 +333,9 @@ fn parse_attr_from_attr(attr: &Attribute) -> Result<Route, Error> {
333333 }
334334 } else if name == "route" {
335335 // route macro: first arg could be method string? Not handling for now.
336- return Err ( Error :: unsupported_format (
336+ Err ( Error :: unsupported_format (
337337 "'route' attribute parsing not implemented" ,
338- ) ) ;
338+ ) )
339339 } else {
340340 match Method :: from_str ( & name) {
341341 Ok ( m) => {
@@ -345,18 +345,16 @@ fn parse_attr_from_attr(attr: &Attribute) -> Result<Route, Error> {
345345 . map_err ( |e| Error :: unsupported_format ( & e. to_string ( ) ) ) ?,
346346 None => return Err ( Error :: too_few_items ( 1 ) ) ,
347347 } ;
348- return Ok ( Route {
348+ Ok ( Route {
349349 method : m,
350350 origin,
351351 media_type,
352352 data_param : data_param. map ( trim_angle_brackers) ,
353- } ) ;
354- }
355- Err ( ( ) ) => {
356- return Err ( Error :: unsupported_format ( & format ! (
357- "Unknown HTTP method: '{name}'"
358- ) ) )
353+ } )
359354 }
355+ Err ( ( ) ) => Err ( Error :: unsupported_format ( & format ! (
356+ "Unknown HTTP method: '{name}'"
357+ ) ) ) ,
360358 }
361359 }
362360}
You can’t perform that action at this time.
0 commit comments