(version: &str)
| 204 | /// The fixed version requirements string. |
| 205 | #[must_use] |
| 206 | pub fn fix_semver(version: &str) -> String { |
| 207 | // Check if is semver, then if the first character is a number, then we prefix with = |
| 208 | if Version::parse(version).is_ok() && version.chars().next().is_some_and(|c| c.is_ascii_digit()) { |
| 209 | return format!("={version}"); |
| 210 | } |
| 211 | version.to_string() |
| 212 | } |
| 213 | |
| 214 | impl Default for Discovery { |
| 215 | fn default() -> Self { |