diff --git a/docs/cargo.html b/docs/cargo.html index 77839a91..071dacf1 100644 --- a/docs/cargo.html +++ b/docs/cargo.html @@ -42,7 +42,7 @@
此快速参考备忘清单 Cargo 提供了编译 Rust 常用命令和示例
$ curl -sSf https://static.rust-lang.org/rustup.sh | sh
@@ -164,22 +164,25 @@
Running `target/hello_world`
Hello, world!
-.
-├── Cargo.lock
-├── Cargo.toml
-├── benches # 基准目录
-│ └── large-input.rs
-├── examples # 示例
-│ └── simple.rs
-├── src # 源代码
-│ ├── bin
-│ │ └── another_executable.rs
-│ ├── lib.rs # 默认库
-│ └── main.rs # 入口文件
-└── tests # 集成测试
- └── some-integration-tests.rs
+
# `source` 表下,就是存储有关要更换的来源名称
+[source]
+
+# 在`source` 表格之下的,可为一定数量的有关来源名称. 示例下面就,定义了一个新源, 叫 `my-awesome-source`,其内容来自本地,`vendor`目录 ,其相对于包含 `.cargo/config` 文件的目录
+[source.my-awesome-source]
+directory = "vendor"
+
+# Git sources 也指定一个 branch/tag/rev
+git = "https://example.com/path/to/repo"
+# branch = "master"
+# tag = "v1.0.1"
+# rev = "313f44e8"
+
+# crates.io 默认源 在"crates-io"名称下,且在这里我们使用 `replace-with` 字段指明 默认源更换成"my-awesome-source"源
+[source.crates-io]
+replace-with = "my-awesome-source"
+
# 编译输出二进制文件,放入 `target/debug` 目录
$ cargo build
@@ -188,14 +191,16 @@
$ cargo run # 编译并运行
$ cargo test # 运行你的所有测试
+$ cargo test # 运行你的所有测试
# 指定函数过滤器
$ cargo test test_foo # 开头是 test_foo 的函数都会运行,例如(test_foo_bar)
# 指定特定模块中的测试函数(通常可以简写 cargo test foo::bar::tests::test_foo)
-cargo test --package rustt --lib -- foo::bar::tests::test_foo --exact --nocapture
+$ cargo test --package rustt --lib -- foo::bar::tests::test_foo --exact --nocapture
+
# 指定特定测试的模块(通常可以简写 cargo test foo::bar::tests)
-cargo test --package rustt --lib -- foo::bar::tests --nocapture
+$ cargo test --package rustt --lib -- foo::bar::tests --nocapture
+
[package]
@@ -223,25 +228,22 @@
edition = '2015'
-# `source` 表下,就是存储有关要更换的来源名称
-[source]
-
-# 在`source` 表格之下的,可为一定数量的有关来源名称. 示例下面就,定义了一个新源, 叫 `my-awesome-source`,其内容来自本地,`vendor`目录 ,其相对于包含 `.cargo/config` 文件的目录
-[source.my-awesome-source]
-directory = "vendor"
-
-# Git sources 也指定一个 branch/tag/rev
-git = "https://example.com/path/to/repo"
-# branch = "master"
-# tag = "v1.0.1"
-# rev = "313f44e8"
-
-# crates.io 默认源 在"crates-io"名称下,且在这里我们使用 `replace-with` 字段指明 默认源更换成"my-awesome-source"源
-[source.crates-io]
-replace-with = "my-awesome-source"
+
.
+├── Cargo.lock
+├── Cargo.toml
+├── benches # 基准目录
+│ └── large-input.rs
+├── examples # 示例
+│ └── simple.rs
+├── src # 源代码
+│ ├── bin
+│ │ └── another_executable.rs
+│ ├── lib.rs # 默认库
+│ └── main.rs # 入口文件
+└── tests # 集成测试
+ └── some-integration-tests.rs
-
# 每个源都有自己的表格,名称即是表名
[source.the-source-name]
diff --git a/index.html b/index.html
index 9db7500f..9300e887 100644
--- a/index.html
+++ b/index.html
@@ -463,6 +463,9 @@
+
+
+