fn find_contained_package(&self, name: &str) -> CargoResult<PackageId> {
        let root_path = self.workspace.root();
        for (pkg_id, pkg) in &self.pkgs {
            if pkg.manifest_path().starts_with(root_path) && pkg.name().as_str() == name {
                return Ok(pkg_id.clone());
            }
        }
        Err(format_err!("Cannot find package {} in workspace", name))
    }
/// Find a contained package, which is a member or dependency inside the workspace
Find a contained package, which is a member or dependency inside the workspace
Find a contained package which is a member or dependency inside the workspace
fn find_contained_package(&self, name: &str) -> CargoResult<PackageId> {
        let root_path = self.workspace.root();
        for (pkg_id, pkg) in &self.pkgs {
            if pkg.manifest_path().starts_with(root_path) && pkg.name().as_str() == name {
                return Ok(pkg_id.clone());
            }
        }
        Err(format_err!("Cannot find package {} in workspace", name))
    }
fn find_contained_package ( & self , name : & str ) -> CargoResult < PackageId > { let root_path = self . workspace . root ( ) ; for ( pkg_id , pkg ) in & self . pkgs { if pkg . manifest_path ( ) . starts_with ( root_path ) && pkg . name ( ) . as_str ( ) == name { return Ok ( pkg_id . clone ( ) ) ; } } Err ( format_err ! ( " " name ) ) }
Find a contained package, which is a member or dependency inside the workspace
Find a contained package which is a member or dependency inside the workspace
&self
name
&str