From 08897d7dd555a54c6df024f5fe1925c091d55ce1 Mon Sep 17 00:00:00 2001 From: wuhaifei Date: Sat, 8 Jan 2022 17:24:43 +0800 Subject: [PATCH] fix cargo dependencies --- book/contents/basic/base-type/numbers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/contents/basic/base-type/numbers.md b/book/contents/basic/base-type/numbers.md index 4b0d9734..3b7ade4c 100644 --- a/book/contents/basic/base-type/numbers.md +++ b/book/contents/basic/base-type/numbers.md @@ -262,7 +262,7 @@ Rust的标准库相比其它语言,对于准入的门槛较高,因此有理 按照以下步骤来引入`num`库: 1. 创建新工程`cargo new complex-num && cd complex-num` -2. 在`Cargo.toml`中的`[dependencies]`下添加一行`num = 0.4` +2. 在`Cargo.toml`中的`[dependencies]`下添加一行`num = "0.4.0"` 3. 将`src/main.rs`文件中的`main`函数替换为下面的代码 4. 运行`cargo run`