Skip to content

Commit 9b5bc78

Browse files
committed
Update doc string for deps_of/compute_deps.
1 parent 5e09899 commit 9b5bc78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cargo/core/compiler/unit_dependencies.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ fn deps_of_roots(roots: &[Unit], state: &mut State<'_, '_>) -> CargoResult<()> {
226226
Ok(())
227227
}
228228

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

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

0 commit comments

Comments
 (0)