Skip to content

Commit

Permalink
Update doc string for deps_of/compute_deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Mar 21, 2022
1 parent 5e09899 commit 9b5bc78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cargo/core/compiler/unit_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ fn deps_of_roots(roots: &[Unit], state: &mut State<'_, '_>) -> CargoResult<()> {
Ok(())
}

/// Compute the dependencies of a single unit.
/// Compute the dependencies of a single unit, recursively computing all
/// transitive dependencies.
///
/// The result is stored in `state.unit_dependencies`.
fn deps_of(unit: &Unit, state: &mut State<'_, '_>, unit_for: UnitFor) -> CargoResult<()> {
// Currently the `unit_dependencies` map does not include `unit_for`. This should
// be safe for now. `TestDependency` only exists to clear the `panic`
Expand All @@ -246,10 +249,7 @@ fn deps_of(unit: &Unit, state: &mut State<'_, '_>, unit_for: UnitFor) -> CargoRe
Ok(())
}

/// For a package, returns all targets that are registered as dependencies
/// for that package.
/// This returns a `Vec` of `(Unit, UnitFor)` pairs. The `UnitFor`
/// is the profile type that should be used for dependencies of the unit.
/// Returns the direct unit dependencies for the given `Unit`.
fn compute_deps(
unit: &Unit,
state: &mut State<'_, '_>,
Expand Down

0 comments on commit 9b5bc78

Please sign in to comment.