(id: &str)
| 1068 | } |
| 1069 | |
| 1070 | fn is_valid_profile_id(id: &str) -> bool { |
| 1071 | !id.is_empty() |
| 1072 | && !id.starts_with('-') |
| 1073 | && !id.ends_with('-') |
| 1074 | && id.split('-').all(|part| { |
| 1075 | !part.is_empty() |
| 1076 | && part |
| 1077 | .bytes() |
| 1078 | .all(|b| b.is_ascii_lowercase() || b.is_ascii_digit()) |
| 1079 | }) |
| 1080 | } |
| 1081 | |
| 1082 | #[must_use] |
| 1083 | pub fn validate_profile_set( |
no test coverage detected