-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable unnecessary/unused regex features (#261)
* Avoid unnecessary case-insensitive regexes The case-insensitive flag `(?i)` requires regex with the unicode-case feature enabled which significantly increases the binary size and makes regex slower. * Disable unnecessary/unused regex features regex crate with default features enabled is huge, it significantly increases the binary size and compile time. Cargo features are additive, so once some feature is enabled anywhere in the dependency graph, there's no way to disable it, i.e. one (transitive) dependency infects the whole dependency graph. Since `#[validate(regex = "...")]` takes a path to a static Regex instance, not regex as a string, users have to add the `regex` dependency to their Cargo.toml to use it. Therefore, this change shouldn't break backward compatibility.
- Loading branch information
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters