diff --git a/actix-web-codegen/src/lib.rs b/actix-web-codegen/src/lib.rs index 1aeb6dd35..163053c01 100644 --- a/actix-web-codegen/src/lib.rs +++ b/actix-web-codegen/src/lib.rs @@ -256,11 +256,9 @@ pub fn test(_: TokenStream, item: TokenStream) -> TokenStream { /// /// ```rust /// use actix_web_codegen::{scope}; -/// /// #[scope("/test")] /// mod scope_module { /// use actix_web::{get, HttpResponse, Responder}; -/// /// #[get("/test")] /// pub async fn test() -> impl Responder { /// // this has path /test/test diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index ea2fd48aa..1ff8efd48 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -633,7 +633,7 @@ fn modify_attribute_with_scope(attr: &syn::Attribute, scope_path: &str) -> syn:: acc }); - return syn::Attribute { + syn::Attribute { meta: syn::Meta::List(syn::MetaList { tokens: quote! { #modified_path #combined_options_tokens }, ..meta_list.clone()