Skip to content

Commit 2296c28

Browse files
committed
ch14 CargoとCrates.ioについてより詳しくの和訳を最新版に更新
rust-lang/book@19c40bf
1 parent 239347a commit 2296c28

File tree

56 files changed

+713
-746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+713
-746
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "my_crate"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]

listings/ch14-more-about-cargo/listing-14-01/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// Adds one to the number given.
2+
/// 与えられた数値に1を足す。
23
///
34
/// # Examples
45
///
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "my_crate"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]

listings/ch14-more-about-cargo/listing-14-02/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
//!
44
//! `my_crate` is a collection of utilities to make performing certain
55
//! calculations more convenient.
6-
6+
//!
7+
//! # 自分のクレート
8+
//!
9+
//! `my_crate`は、ユーティリティの集まりであり、特定の計算をより便利に行うことができます。
710
/// Adds one to the number given.
811
// --snip--
912
// ANCHOR_END: here
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "art"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]

listings/ch14-more-about-cargo/listing-14-03/src/lib.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
//! # Art
33
//!
44
//! A library for modeling artistic concepts.
5+
//!
6+
//! # 芸術
7+
//!
8+
//! 芸術的な概念をモデル化するライブラリ。
59
610
pub mod kinds {
711
/// The primary colors according to the RYB color model.
12+
/// RYBカラーモデルによる主色。
813
pub enum PrimaryColor {
914
Red,
1015
Yellow,
1116
Blue,
1217
}
1318

1419
/// The secondary colors according to the RYB color model.
20+
/// RYBカラーモデルによる副色。
1521
pub enum SecondaryColor {
1622
Orange,
1723
Green,
@@ -24,13 +30,12 @@ pub mod utils {
2430

2531
/// Combines two primary colors in equal amounts to create
2632
/// a secondary color.
33+
/// 2つの主色を同じ割合で混合し、副色にする。
2734
pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
2835
// --snip--
2936
// ANCHOR_END: here
30-
SecondaryColor::Orange
37+
unimplemented!();
3138
// ANCHOR: here
3239
}
3340
}
3441
// ANCHOR_END: here
35-
36-
fn main() {}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "art"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "art"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "art"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
[dependencies]

listings/ch14-more-about-cargo/listing-14-07/add/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)