// Add the given package to the dynamic index.
Add the given package to the dynamic index.
Add the given package to the dynamic index .
fn add_package(&mut self, hash: Hash, package: Package) {
        match &package {
            Package::Pending => {}
            Package::WithMetaFar { .. } => {}
            Package::Active { path, .. } => {
                if let Some(previous_package) = self.active_packages.insert(path.clone(), hash) {
                    self.packages.remove(&previous_package);
                }
            }
        }
        let package_node = self.make_package_node(&package, &hash);
        self.packages.insert(hash, PackageWithInspect { package, package_node });
    }
fn add_package ( & mut self , hash : Hash , package : Package ) { match & package { Package :: Pending => { } Package :: WithMetaFar { .. } => { } Package :: Active { path , .. } => { if let Some ( previous_package ) = self . active_packages . insert ( path . clone ( ) , hash ) { self . packages . remove ( & previous_package ) ; } } } let package_node = self . make_package_node ( & package , & hash ) ; self . packages . insert ( hash , PackageWithInspect { package , package_node } ) ; }
Add the given package to the dynamic index.
Add the given package to the dynamic index .
&mut self
hash
Hash
package
Package