Skip to content

Commit

Permalink
Merge pull request #186 from sadwx/patch-1
Browse files Browse the repository at this point in the history
remove duplicate words
  • Loading branch information
weihanglo authored Nov 15, 2023
2 parents dfca5d8 + 332e924 commit 394f88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch14-03-cargo-workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $ cargo new add_one --lib
{{#include ../listings/ch14-more-about-cargo/no-listing-02-workspace-with-two-crates/add/adder/Cargo.toml:6:7}}
```

Cargo 不會假設工作空間下的 crate 會彼此依賴,我們我們要指定彼此之間依賴的關係
Cargo 不會假設工作空間下的 crate 會彼此依賴,我們要指定彼此之間依賴的關係

接著讓我們在 `adder` 內使用 `add_one` crate 的 `add_one` 函式。開啟 *adder/src/main.rs* 檔案並在最上方加上 `use` 來將 `add_one` 函式庫引入作用域。然後變更 `main` 函式來呼叫 `add_one` 函式,如範例 14-7 所示。

Expand Down

0 comments on commit 394f88d

Please sign in to comment.