actix / actix-web

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
https://actix.rs
Apache License 2.0
21.44k stars 1.66k forks source link

Do not require actix-router default features from actix-web-codegen #3372

Closed dbanty closed 3 months ago

dbanty commented 4 months ago

PR Type

Bug Fix

PR Checklist

Overview

This should allow you to omit the regex dependency when using actix-web 4.6.0 with the macros feature enabled (and no unicode).

robjtede commented 3 months ago

Turns out we actually have a concession here in that the errors are strictly worse with the unicode feature disables. Only those who explicitly disable it will see them though, so I'm okay with it.

 13 | #[get("/{}")]
    | ^^^^^^^^^^^^^
    |
-   = help: message: Wrong path pattern: "/{}" regex parse error:
-               ((?s-m)^/(?P<>[^/]+))$
-                            ^
-           error: empty capture group name
+   = help: message: Wrong path pattern: "/{}" empty capture group names are not allowed