Skip to content

Commit fd81e6e

Browse files
Resolved collisions between missing_docs clippy lints (#3653)
* Trying to resolve the clippy forbid(missing_doc) in web codegen * Specifying to use workspace version * Restored cargo toml as they were * Restored toml and lock to original * Replaced `#[doc(hidden)]` with documentation comments * Reformatted code * Removed auto-generated doc comment as existing doc comment should be fine
1 parent 1f9bc2d commit fd81e6e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

actix-web-codegen/src/route.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ macro_rules! standard_method_type {
5959
(
6060
$($variant:ident, $upper:ident, $lower:ident,)+
6161
) => {
62+
#[doc(hidden)]
6263
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
6364
pub enum MethodType {
6465
$(
@@ -466,7 +467,7 @@ impl ToTokens for Route {
466467

467468
let stream = quote! {
468469
#(#doc_attributes)*
469-
#[allow(non_camel_case_types, missing_docs)]
470+
#[allow(non_camel_case_types)]
470471
#vis struct #name;
471472

472473
impl ::actix_web::dev::HttpServiceFactory for #name {

actix-web/src/response/http_codes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use crate::{HttpResponse, HttpResponseBuilder};
66

77
macro_rules! static_resp {
88
($name:ident, $status:expr) => {
9-
#[allow(non_snake_case, missing_docs)]
9+
#[allow(non_snake_case)]
10+
#[doc = concat!("Creates a new response builder with the status code `", stringify!($status), "`.")]
1011
pub fn $name() -> HttpResponseBuilder {
1112
HttpResponseBuilder::new($status)
1213
}

0 commit comments

Comments
 (0)