(key: &str)
| 500 | } |
| 501 | |
| 502 | fn split_revisioned_env_key(key: &str) -> Option<(&str, &str)> { |
| 503 | let suffix = key.strip_prefix('v')?; |
| 504 | let (revision, env_key) = suffix.split_once('_')?; |
| 505 | if revision.is_empty() |
| 506 | || !revision.bytes().all(|b| b.is_ascii_digit()) |
| 507 | || env_key.is_empty() |
| 508 | || !env_key.bytes().all(is_env_key_char) |
| 509 | { |
| 510 | return None; |
| 511 | } |
| 512 | Some((revision, env_key)) |
| 513 | } |
| 514 | |
| 515 | fn token_boundary_ok(text: &str, abs_start: usize, token_end: usize, token: &str) -> bool { |
| 516 | if token.starts_with(PLACEHOLDER_PREFIX) { |
no test coverage detected