Skip to content

Commit 5298fd4

Browse files
committed
Fix a typo in "Announcing Rust 1.51.0" article
1 parent ef9ef0a commit 5298fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2021-03-25-Rust-1.51.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Note that this is added as a separate method instead of `.into_iter()` on arrays
9696

9797
Dependency management is a hard problem, and one of the hardest parts of it is just picking what *version* of a dependency to use when it's depended on by two different packages. This doesn't just include its version number, but also what features are or aren't enabled for the package. Cargo's default behaviour is to merge features for a single package when it's referred to multiple times in the dependency graph.
9898

99-
For example, let's say you had a dependency called `foo` with features A and B, which was being used by packages `bar` and `baz`, but `bar` depends on `foo+A` and `baz` depends on `foo+B`. Cargo will merge both of those features and compile `foo` as `foo+AB`. This has a benefit that you only have to compile `foo` once, and then it can reused for both `bar` and `baz`.
99+
For example, let's say you had a dependency called `foo` with features A and B, which was being used by packages `bar` and `baz`, but `bar` depends on `foo+A` and `baz` depends on `foo+B`. Cargo will merge both of those features and compile `foo` as `foo+AB`. This has a benefit that you only have to compile `foo` once, and then it can be reused for both `bar` and `baz`.
100100

101101
However, this also comes with a downside. What if a feature enabled in a build-dependency is not compatible with the target you are building for?
102102

0 commit comments

Comments
 (0)