We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
matches!
1 parent fb0c5f2 commit 796e183Copy full SHA for 796e183
src/models/team.rs
@@ -123,14 +123,11 @@ impl Team {
123
// check that `team` is the `slug` in results, and grab its data
124
125
// "sanitization"
126
- fn whitelist(c: char) -> bool {
127
- match c {
128
- 'a'..='z' | 'A'..='Z' | '0'..='9' | '-' | '_' => false,
129
- _ => true,
130
- }
+ fn is_allowed_char(c: char) -> bool {
+ matches!(c, 'a'..='z' | 'A'..='Z' | '0'..='9' | '-' | '_')
131
}
132
133
- if let Some(c) = org_name.chars().find(|c| whitelist(*c)) {
+ if let Some(c) = org_name.chars().find(|c| !is_allowed_char(*c)) {
134
return Err(cargo_err(&format_args!(
135
"organization cannot contain special \
136
characters like {}",
0 commit comments