/// Computes the workspace path for this package. Errors if this package is not in the
/// workspace.
Computes the workspace path for this package. Errors if this package is not in the
workspace.
Computes the workspace path for this package . Errors if this package is not in the workspace .
fn workspace_path(
        &self,
        id: &PackageId,
        manifest_path: &Utf8Path,
    ) -> Result<Box<Utf8Path>, Error> {
        // Strip off the workspace path from the manifest path.
        let workspace_path = manifest_path
            .strip_prefix(self.workspace_root)
            .map_err(|_| {
                Error::PackageGraphConstructError(format!(
                    "workspace member '{}' at path {:?} not in workspace (root: {})",
                    id, manifest_path, self.workspace_root
                ))
            })?;
        let workspace_path = workspace_path.parent().ok_or_else(|| {
            Error::PackageGraphConstructError(format!(
                "workspace member '{}' has invalid manifest path {:?}",
                id, manifest_path
            ))
        })?;
        Ok(convert_forward_slashes(workspace_path).into_boxed_path())
    }
fn workspace_path ( & self , id : & PackageId , manifest_path : & Utf8Path , ) -> Result < Box < Utf8Path > , Error > { // Strip off the workspace path from the manifest path. let workspace_path = manifest_path . strip_prefix ( self . workspace_root ) . map_err ( | _ | { Error :: PackageGraphConstructError ( format ! ( " " id manifest_path self workspace_root ) ) } ) ? ; let workspace_path = workspace_path . parent ( ) . ok_or_else ( | | { Error :: PackageGraphConstructError ( format ! ( " " id manifest_path ) ) } ) ? ; Ok ( convert_forward_slashes ( workspace_path ) . into_boxed_path ( ) ) }
Computes the workspace path for this package.
Computes the workspace path for this package .
&self
id
&PackageId
manifest_path
&Utf8Path