mirror of https://github.com/fafhrd91/actix-web
Replaced `#[doc(hidden)]` with documentation comments
This commit is contained in:
parent
15c3ce59c8
commit
2c4a3b9d76
|
@ -465,9 +465,13 @@ impl ToTokens for Route {
|
|||
})
|
||||
.collect();
|
||||
|
||||
let documentation = format!(
|
||||
"Struct generated by the routing macro for the handler function `{name}`.",
|
||||
);
|
||||
|
||||
let stream = quote! {
|
||||
#(#doc_attributes)*
|
||||
#[doc(hidden)]
|
||||
#[doc = #documentation]
|
||||
#[allow(non_camel_case_types)]
|
||||
#vis struct #name;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::{HttpResponse, HttpResponseBuilder};
|
|||
macro_rules! static_resp {
|
||||
($name:ident, $status:expr) => {
|
||||
#[allow(non_snake_case)]
|
||||
#[doc(hidden)]
|
||||
#[doc = concat!("Creates a new response builder with the status code `", stringify!($status), "`.")]
|
||||
pub fn $name() -> HttpResponseBuilder {
|
||||
HttpResponseBuilder::new($status)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue