fn parse_version_from_cli(arg: &String) -> RequestedVersion {
    if arg.starts_with("-") {
        let mut version = arg.clone();
        version.remove(0);
        match RequestedVersion::from_string(&version) {
            Ok(v) => v,
            Err(_) => RequestedVersion::Any,
        }
    } else {
        RequestedVersion::Any
    }
}
/// Attempts to parse a version specifier from a CLI argument.
///
/// Any failure to parse leads to `RequestedVersion::Any` being returned.
Attempts to parse a version specifier from a CLI argument.
Any failure to parse leads to `RequestedVersion::Any` being returned.
Attempts to parse a version specifier from a CLI argument . Any failure to parse leads to ` RequestedVersion :: Any ` being returned .
fn parse_version_from_cli(arg: &String) -> RequestedVersion {
    if arg.starts_with("-") {
        let mut version = arg.clone();
        version.remove(0);
        match RequestedVersion::from_string(&version) {
            Ok(v) => v,
            Err(_) => RequestedVersion::Any,
        }
    } else {
        RequestedVersion::Any
    }
}
fn parse_version_from_cli ( arg : & String ) -> RequestedVersion { if arg . starts_with ( " " ) { let mut version = arg . clone ( ) ; version . remove ( 0 ) ; match RequestedVersion :: from_string ( & version ) { Ok ( v ) => v , Err ( _ ) => RequestedVersion :: Any , } } else { RequestedVersion :: Any } }
Attempts to parse a version specifier from a CLI argument.
Attempts to parse a version specifier from a CLI argument .
arg
&String
arg
&String