pub fn default_members(package_graph: &'g PackageGraph, project_root: &Path) -> Result<Self> {
        #[derive(Deserialize)]
        struct RootToml<'a> {
            #[serde(borrow)]
            workspace: Workspace<'a>,
        }

        #[derive(Deserialize)]
        struct Workspace<'a> {
            #[serde(borrow)]
            #[serde(rename = "default-members")]
            default_members: Vec<&'a Path>,
        }

        let root_toml = project_root.join("Cargo.toml");
        let contents =
            fs::read(&root_toml).map_err(|err| SystemError::io("reading root Cargo.toml", err))?;
        let contents: RootToml = de::from_slice(&contents)
            .map_err(|err| SystemError::de("deserializing root Cargo.toml", err))?;
        let default_members = contents.workspace.default_members;

        let cargo_opts = CargoOptions::new().with_dev_deps(false);
        Ok(Self::new(
            package_graph,
            default_members,
            default_filter(),
            &cargo_opts,
        )?)
    }
/// Creates a new subset of default members by reading the root `Cargo.toml` file.
///
/// This does not include dev-dependencies.
Creates a new subset of default members by reading the root `Cargo.toml` file.
This does not include dev-dependencies.
Creates a new subset of default members by reading the root ` Cargo . toml ` file . This does not include dev - dependencies .
pub fn default_members(package_graph: &'g PackageGraph, project_root: &Path) -> Result<Self> {
        #[derive(Deserialize)]
        struct RootToml<'a> {
            #[serde(borrow)]
            workspace: Workspace<'a>,
        }
        #[derive(Deserialize)]
        struct Workspace<'a> {
            #[serde(borrow)]
            #[serde(rename = "default-members")]
            default_members: Vec<&'a Path>,
        }
        let root_toml = project_root.join("Cargo.toml");
        let contents =
            fs::read(&root_toml).map_err(|err| SystemError::io("reading root Cargo.toml", err))?;
        let contents: RootToml = de::from_slice(&contents)
            .map_err(|err| SystemError::de("deserializing root Cargo.toml", err))?;
        let default_members = contents.workspace.default_members;
        let cargo_opts = CargoOptions::new().with_dev_deps(false);
        Ok(Self::new(
            package_graph,
            default_members,
            default_filter(),
            &cargo_opts,
        )?)
    }
pub fn default_members ( package_graph : & ' g PackageGraph , project_root : & Path ) -> Result < Self > { # [ derive ( Deserialize ) ] struct RootToml < ' a > { # [ serde ( borrow ) ] workspace : Workspace < ' a > , } # [ derive ( Deserialize ) ] struct Workspace < ' a > { # [ serde ( borrow ) ] # [ serde ( rename " " ) ] default_members : Vec < & ' a Path > , } let root_toml = project_root . join ( " " ) ; let contents = fs :: read ( & root_toml ) . map_err ( | err | SystemError :: io ( " " , err ) ) ? ; let contents : RootToml = de :: from_slice ( & contents ) . map_err ( | err | SystemError :: de ( " " , err ) ) ? ; let default_members = contents . workspace . default_members ; let cargo_opts = CargoOptions :: new ( ) . with_dev_deps ( false ) ; Ok ( Self :: new ( package_graph , default_members , default_filter ( ) , & cargo_opts , ) ? ) }
Creates a new subset of default members by reading the root `Cargo.toml` file.
Creates a new subset of default members by reading the root ` Cargo . toml ` file .
package_graph
&'g PackageGraph
project_root
&Path
package_graph
&'g PackageGraph
project_root
&Path