fn check_plugin(
    reinstall_deps: opts::ReinstallDeps,
    xcode_version: (u32, u32),
    repo: &Repo,
    plugins_dir: &Path,
    spec_dst: &Path,
    meta_dst: &Path,
) -> Result<Status, Error> {
    let status = if reinstall_deps.yes() {
        Status::Stale
    } else {
        let plugin_dst = plugins_dir.join("Rust.ideplugin");
        let plugin_present = plugin_dst.is_dir();
        log::info!("plugin present at {:?}: {}", plugin_dst, plugin_present);
        let spec_present = spec_dst.is_file();
        log::info!("lang spec present at {:?}: {}", spec_dst, spec_present);
        let meta_present = if xcode_version.0 >= 11 {
            let present = meta_dst.is_file();
            log::info!("lang metadata present at {:?}: {}", meta_dst, present);
            present
        } else {
            true
        };
        let all_present = plugin_present && spec_present && meta_present;
        if all_present {
            // check if anything's changed upstream
            repo.status().map_err(Error::StatusFailed)?
        } else {
            Status::Stale
        }
    };
    Ok(status)
}
// Step 1: check if installed and up-to-date
Step 1: check if installed and up-to-date
Step 1 : check if installed and up - to - date
fn check_plugin(
    reinstall_deps: opts::ReinstallDeps,
    xcode_version: (u32, u32),
    repo: &Repo,
    plugins_dir: &Path,
    spec_dst: &Path,
    meta_dst: &Path,
) -> Result<Status, Error> {
    let status = if reinstall_deps.yes() {
        Status::Stale
    } else {
        let plugin_dst = plugins_dir.join("Rust.ideplugin");
        let plugin_present = plugin_dst.is_dir();
        log::info!("plugin present at {:?}: {}", plugin_dst, plugin_present);
        let spec_present = spec_dst.is_file();
        log::info!("lang spec present at {:?}: {}", spec_dst, spec_present);
        let meta_present = if xcode_version.0 >= 11 {
            let present = meta_dst.is_file();
            log::info!("lang metadata present at {:?}: {}", meta_dst, present);
            present
        } else {
            true
        };
        let all_present = plugin_present && spec_present && meta_present;
        if all_present {
            // check if anything's changed upstream
            repo.status().map_err(Error::StatusFailed)?
        } else {
            Status::Stale
        }
    };
    Ok(status)
}
fn check_plugin ( reinstall_deps : opts :: ReinstallDeps , xcode_version : ( u32 , u32 ) , repo : & Repo , plugins_dir : & Path , spec_dst : & Path , meta_dst : & Path , ) -> Result < Status , Error > { let status = if reinstall_deps . yes ( ) { Status :: Stale } else { let plugin_dst = plugins_dir . join ( " " ) ; let plugin_present = plugin_dst . is_dir ( ) ; log :: info ! ( " " plugin_dst plugin_present ) ; let spec_present = spec_dst . is_file ( ) ; log :: info ! ( " " spec_dst spec_present ) ; let meta_present = if xcode_version . 0 >= 11 { let present = meta_dst . is_file ( ) ; log :: info ! ( " " meta_dst present ) ; present } else { true } ; let all_present = plugin_present && spec_present && meta_present ; if all_present { // check if anything's changed upstream repo . status ( ) . map_err ( Error :: StatusFailed ) ? } else { Status :: Stale } } ; Ok ( status ) }
Step 1: check if installed and up-to-date
Step 1 : check if installed and up - to - date
reinstall_deps
opts::ReinstallDeps
xcode_version
(u32, u32)
repo
&Repo
plugins_dir
&Path
spec_dst
&Path
meta_dst
&Path