Skip to content

Commit a217183

Browse files
committed
wip
1 parent 7d55fcb commit a217183

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ jobs:
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

rocket-okapi-codegen/src/openapi_attr/route_attr.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)