Closed Erk- closed 10 months ago
Hello again @Erk- sorry about the late response and thanks for the PR.
This is actually a remnant from when I had plans to implement a server and client in this repo and the file is not really used. I started writing a server in another repo.
Do you need it for something special?
I don't need it for anything, I was just looking through the dependencies and was seeing if I could remove some of them and spotted the issue above. So it may be better to just remove it.
Thanks I’ll remove it then!
@tommymalmqvist I can see that it is used for the #[validate(...)]
attributes, should these also be removed or would it make more sense to keep validate_string_identifier
in that case?
@tommymalmqvist I can see that it is used for the
#[validate(...)]
attributes, should these also be removed or would it make more sense to keepvalidate_string_identifier
in that case?
Yes, you are correct!
I could update the regex like so also:
let re = Regex::new(r"^[a-zA-Z0-9*+=:|@._-]*$").unwrap();
Yeah that would also be a valid solution, though it should probably be ..]+$
.
Would you rather keep a regex based solution because then I can switch to that.
Lets go with regex 👍
@tommymalmqvist I have updated it to use regex, so you can have another look now.
Patch coverage: 100.00%
and project coverage change: +84.12%
:tada:
Comparison is base (
7dceebb
) 0.34% compared to head (4b9019c
) 84.47%. Report is 6 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Any string containing at least one valid character would be allowed by the regex, this fix removes regex and does a normal scan of the string instead.
This patch also contains some cleaning in the Cargo.toml file where it removes dependencies that was not in use.