Docker container names may not end with `-`, `.`, or `_`. Truncation can leave one of those trailing, so strip them before returning.
(mut value: String)
| 2991 | /// Docker container names may not end with `-`, `.`, or `_`. Truncation can |
| 2992 | /// leave one of those trailing, so strip them before returning. |
| 2993 | fn trim_container_name_tail(mut value: String) -> String { |
| 2994 | while value |
| 2995 | .chars() |
| 2996 | .last() |
| 2997 | .is_some_and(|ch| matches!(ch, '-' | '.' | '_')) |
| 2998 | { |
| 2999 | value.pop(); |
| 3000 | } |
| 3001 | value |
| 3002 | } |
| 3003 | |
| 3004 | fn sanitize_docker_name(value: &str) -> String { |
| 3005 | value |
no outgoing calls
no test coverage detected