[][src]Function cargo_update::ops::intersect_packages

pub fn intersect_packages(
    installed: &[RegistryPackage],
    to_update: &[(String, Option<Semver>, String)],
    allow_installs: bool,
    installed_git: &[GitRepoPackage]
) -> Vec<RegistryPackage>

Filter out the installed packages not specified to be updated and add the packages you specify to install, if they aren't already installed via git.

List installed packages with installed_registry_packages().

Examples

let mut installed_packages = installed_registry_packages(&cargo_dir);
installed_packages = intersect_packages(&installed_packages, &packages_to_update, false, &[]);