From e80e922fc3b8f6fbd9d0c52813c7ea8543fd762d Mon Sep 17 00:00:00 2001 From: Orefa Date: Mon, 21 Sep 2020 07:25:07 +0800 Subject: [PATCH] Update ch14-02-publishing-to-crates-io.md --- src/ch14-02-publishing-to-crates-io.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ch14-02-publishing-to-crates-io.md b/src/ch14-02-publishing-to-crates-io.md index 0f58116..e5b18a3 100644 --- a/src/ch14-02-publishing-to-crates-io.md +++ b/src/ch14-02-publishing-to-crates-io.md @@ -1,6 +1,6 @@ ## 将 crate 发布到 Crates.io -> [ch14-02-publishing-to-crates-io.md](https://github.com/rust-lang/book/blob/master/src/ch14-02-publishing-to-crates-io.md) >
+> [ch14-02-publishing-to-crates-io.md](https://github.com/rust-lang/book/blob/master/src/ch14-02-publishing-to-crates-io.md)
> commit c084bdd9ee328e7e774df19882ccc139532e53d8 我们曾经在项目中使用 [crates.io](https://crates.io) 上的包作为依赖,不过你也可以通过发布自己的包来向它人分享代码。[crates.io](https://crates.io) 用来分发包的源代码,所以它主要托管开源代码。 @@ -111,17 +111,17 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ```rust,ignore //! # Art //! -//! 一个描述美术信息的库。 +//! A library for modeling artistic concepts. pub mod kinds { - /// 采用 RGB 色彩模式的主要颜色。 + /// The primary colors according to the RYB color model. pub enum PrimaryColor { Red, Yellow, Blue, } - /// 采用 RGB 色彩模式的次要颜色。 + /// The secondary colors according to the RYB color model. pub enum SecondaryColor { Orange, Green, @@ -132,8 +132,8 @@ pub mod kinds { pub mod utils { use crate::kinds::*; - /// 等量的混合两个主要颜色 - /// 来创建一个次要颜色。 + /// Combines two primary colors in equal amounts to create + /// a secondary color. pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor { // --snip-- # SecondaryColor::Orange @@ -178,7 +178,7 @@ fn main() { ```rust,ignore //! # Art //! -//! 一个描述美术信息的库。 +//! A library for modeling artistic concepts. pub use self::kinds::PrimaryColor; pub use self::kinds::SecondaryColor;