/// Obtain the rust-version from one of two sources, in order:
/// 1. the rust-version given to the verify subcommand, or
/// 2. the rust-version as specified in the Cargo manifest
Obtain the rust-version from one of two sources, in order:
1. the rust-version given to the verify subcommand, or
2. the rust-version as specified in the Cargo manifest
Obtain the rust - version from one of two sources in order : 1 . the rust - version given to the verify subcommand or 2 . the rust - version as specified in the Cargo manifest
fn try_from_config(config: &Config) -> TResult<Self> {
        let rust_version = config.sub_command_config().verify().rust_version.as_ref();
        let (version, source) = match rust_version {
            Some(v) => Ok((v.clone(), RustVersionSource::Arg)),
            None => {
                let path = config.ctx().manifest_path(config)?;
                let manifest = parse_manifest(path)?;
                manifest
                    .minimum_rust_version()
                    .ok_or_else(|| CargoMSRVError::NoMSRVKeyInCargoToml(path.to_path_buf()))
                    .map(|v| (v.clone(), RustVersionSource::Manifest(path.to_path_buf())))
            }
        }?;
        Ok(Self { version, source })
    }
fn try_from_config ( config : & Config ) -> TResult < Self > { let rust_version = config . sub_command_config ( ) . verify ( ) . rust_version . as_ref ( ) ; let ( version , source ) = match rust_version { Some ( v ) => Ok ( ( v . clone ( ) , RustVersionSource :: Arg ) ) , None => { let path = config . ctx ( ) . manifest_path ( config ) ? ; let manifest = parse_manifest ( path ) ? ; manifest . minimum_rust_version ( ) . ok_or_else ( | | CargoMSRVError :: NoMSRVKeyInCargoToml ( path . to_path_buf ( ) ) ) . map ( | v | ( v . clone ( ) , RustVersionSource :: Manifest ( path . to_path_buf ( ) ) ) ) } } ? ; Ok ( Self { version , source } ) }
Obtain the rust-version from one of two sources, in order:
1. the rust-version given to the verify subcommand, or
2. the rust-version as specified in the Cargo manifest
Obtain the rust - version from one of two sources in order : 1 . the rust - version given to the verify subcommand or 2 . the rust - version as specified in the Cargo manifest
config
&Config