(path: &str)
| 724 | } |
| 725 | |
| 726 | fn endpoint_path_specificity(path: &str) -> u32 { |
| 727 | if path.is_empty() || path == "**" { |
| 728 | return 0; |
| 729 | } |
| 730 | 1_000_000u32.saturating_add(count_as_u32(path.chars().filter(|ch| *ch != '*').count())) |
| 731 | } |
| 732 | |
| 733 | fn count_as_u32(count: usize) -> u32 { |
| 734 | u32::try_from(count).unwrap_or(u32::MAX) |
no test coverage detected