Skip to content

Commit 9da499d

Browse files
committed
ci: generate pages at bf95e61 [ci skip]
1 parent bf95e61 commit 9da499d

File tree

4 files changed

+30
-52
lines changed

4 files changed

+30
-52
lines changed

docs/ch02-00-guessing-game-tutorial.html

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,7 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
911911
<span class="filename">Filename: src/main.rs</span>
912912
-->
913913
<p><span class="filename">ファイル名: src/main.rs</span></p>
914-
<pre><code class="language-rust ignore">extern crate rand;
915-
916-
use std::io;
914+
<pre><code class="language-rust ignore">use std::io;
917915
use rand::Rng;
918916

919917
fn main() {
@@ -927,7 +925,8 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
927925

928926
let mut guess = String::new();
929927

930-
io::stdin().read_line(&amp;mut guess)
928+
io::stdin()
929+
.read_line(&amp;mut guess)
931930
.expect(&quot;Failed to read line&quot;);
932931

933932
println!(&quot;You guessed: {}&quot;, guess);
@@ -939,33 +938,26 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
939938
-->
940939
<p><span class="caption">リスト2-3: 乱数を生成するコードの追加</span></p>
941940
<!--
942-
First, we add a line that lets Rust know we’ll be using the `rand` crate as an
943-
external dependency. This also does the equivalent of calling `use rand`, so
944-
now we can call anything in the `rand` crate by placing `rand::` before it.
945-
-->
946-
<p>まず、コンパイラに<code>rand</code>クレートを外部依存として使用することを知らせる行を追加しています。
947-
これにより、<code>use rand</code>を呼ぶのと同じ効果が得られるので、<code>rand</code>クレートのものを<code>rand::</code>という接頭辞をつけて呼び出せるようになりました。</p>
948-
<!--
949-
Next, we add another `use` line: `use rand::Rng`. The `Rng` trait defines
941+
First, we add a `use` line: `use rand::Rng`. The `Rng` trait defines
950942
methods that random number generators implement, and this trait must be in
951943
scope for us to use those methods. Chapter 10 will cover traits in detail.
952944
-->
953-
<p>次に、別の<code>use</code>行を追加しています: <code>use rand::Rng</code>ですね。<code>Rng</code>トレイトは乱数生成器が実装するメソッドを定義していて、
945+
<p>まず、<code>use</code>行を追加しています: <code>use rand::Rng</code>ですね。<code>Rng</code>トレイトは乱数生成器が実装するメソッドを定義していて、
954946
このトレイトがスコープにないと、メソッドを使用できないのです。トレイトについて詳しくは、
955947
第10章で解説します。</p>
956948
<!--
957-
Also, we’re adding two more lines in the middle. The `rand::thread_rng` function
949+
Next, we’re adding two lines in the middle. The `rand::thread_rng` function
958950
will give us the particular random number generator that we’re going to use:
959951
one that is local to the current thread of execution and seeded by the
960-
operating system. Next, we call the `gen_range` method on the random number
952+
operating system. Then we call the `gen_range` method on the random number
961953
generator. This method is defined by the `Rng` trait that we brought into
962954
scope with the `use rand::Rng` statement. The `gen_range` method takes two
963955
numbers as arguments and generates a random number between them. It’s inclusive
964956
on the lower bound but exclusive on the upper bound, so we need to specify `1`
965957
and `101` to request a number between 1 and 100.
966958
-->
967-
<p>また、途中に2行追加もしています<code>rand::thread_rng</code>関数は、これから使う特定の乱数生成器を返してくれます: この乱数生成器は、実行スレッドに固有で、OSにより、シード値を与えられています。
968-
次に、この乱数生成器の<code>gen_range</code>メソッドを呼び出しています。このメソッドは、
959+
<p>次に、途中に2行を追加しています<code>rand::thread_rng</code>関数は、これから使う特定の乱数生成器を返してくれます: この乱数生成器は、実行スレッドに固有で、OSにより、シード値を与えられています。
960+
そして、この乱数生成器の<code>gen_range</code>メソッドを呼び出しています。このメソッドは、
969961
<code>use rand::Rng</code>文でスコープに導入した<code>Rng</code>トレイトで定義されています。<code>gen_range</code>メソッドは二つの数字を引数に取り、
970962
それらの間の乱数を生成してくれます。範囲は下限値を含み、上限値を含まないため、<code>1</code><code>101</code>と指定しないと1から100の範囲の数字は得られません。</p>
971963
<!--
@@ -1033,9 +1025,7 @@ <h2><a class="header" href="#予想と秘密の数字を比較する" id="予想
10331025
<span class="filename">Filename: src/main.rs</span>
10341026
-->
10351027
<p><span class="filename">ファイル名: src/main.rs</span></p>
1036-
<pre><code class="language-rust ignore">extern crate rand;
1037-
1038-
use std::io;
1028+
<pre><code class="language-rust ignore">use std::io;
10391029
use std::cmp::Ordering;
10401030
use rand::Rng;
10411031

@@ -1543,11 +1533,9 @@ <h3><a class="header" href="#不正な入力を処理する" id="不正な入力
15431533
<span class="filename">Filename: src/main.rs</span>
15441534
-->
15451535
<p><span class="filename">ファイル名: src/main.rs</span></p>
1546-
<pre><code class="language-rust ignore">extern crate rand;
1547-
1548-
use std::io;
1536+
<pre><code class="language-rust ignore">use rand::Rng;
15491537
use std::cmp::Ordering;
1550-
use rand::Rng;
1538+
use std::io;
15511539

15521540
fn main() {
15531541
println!(&quot;Guess the number!&quot;);
@@ -1559,7 +1547,8 @@ <h3><a class="header" href="#不正な入力を処理する" id="不正な入力
15591547

15601548
let mut guess = String::new();
15611549

1562-
io::stdin().read_line(&amp;mut guess)
1550+
io::stdin()
1551+
.read_line(&amp;mut guess)
15631552
.expect(&quot;Failed to read line&quot;);
15641553

15651554
let guess: u32 = match guess.trim().parse() {

docs/print.html

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,9 +2262,7 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
22622262
<span class="filename">Filename: src/main.rs</span>
22632263
-->
22642264
<p><span class="filename">ファイル名: src/main.rs</span></p>
2265-
<pre><code class="language-rust ignore">extern crate rand;
2266-
2267-
use std::io;
2265+
<pre><code class="language-rust ignore">use std::io;
22682266
use rand::Rng;
22692267

22702268
fn main() {
@@ -2278,7 +2276,8 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
22782276

22792277
let mut guess = String::new();
22802278

2281-
io::stdin().read_line(&amp;mut guess)
2279+
io::stdin()
2280+
.read_line(&amp;mut guess)
22822281
.expect(&quot;Failed to read line&quot;);
22832282

22842283
println!(&quot;You guessed: {}&quot;, guess);
@@ -2290,33 +2289,26 @@ <h3><a class="header" href="#乱数を生成する" id="乱数を生成する">
22902289
-->
22912290
<p><span class="caption">リスト2-3: 乱数を生成するコードの追加</span></p>
22922291
<!--
2293-
First, we add a line that lets Rust know we’ll be using the `rand` crate as an
2294-
external dependency. This also does the equivalent of calling `use rand`, so
2295-
now we can call anything in the `rand` crate by placing `rand::` before it.
2296-
-->
2297-
<p>まず、コンパイラに<code>rand</code>クレートを外部依存として使用することを知らせる行を追加しています。
2298-
これにより、<code>use rand</code>を呼ぶのと同じ効果が得られるので、<code>rand</code>クレートのものを<code>rand::</code>という接頭辞をつけて呼び出せるようになりました。</p>
2299-
<!--
2300-
Next, we add another `use` line: `use rand::Rng`. The `Rng` trait defines
2292+
First, we add a `use` line: `use rand::Rng`. The `Rng` trait defines
23012293
methods that random number generators implement, and this trait must be in
23022294
scope for us to use those methods. Chapter 10 will cover traits in detail.
23032295
-->
2304-
<p>次に、別の<code>use</code>行を追加しています: <code>use rand::Rng</code>ですね。<code>Rng</code>トレイトは乱数生成器が実装するメソッドを定義していて、
2296+
<p>まず、<code>use</code>行を追加しています: <code>use rand::Rng</code>ですね。<code>Rng</code>トレイトは乱数生成器が実装するメソッドを定義していて、
23052297
このトレイトがスコープにないと、メソッドを使用できないのです。トレイトについて詳しくは、
23062298
第10章で解説します。</p>
23072299
<!--
2308-
Also, we’re adding two more lines in the middle. The `rand::thread_rng` function
2300+
Next, we’re adding two lines in the middle. The `rand::thread_rng` function
23092301
will give us the particular random number generator that we’re going to use:
23102302
one that is local to the current thread of execution and seeded by the
2311-
operating system. Next, we call the `gen_range` method on the random number
2303+
operating system. Then we call the `gen_range` method on the random number
23122304
generator. This method is defined by the `Rng` trait that we brought into
23132305
scope with the `use rand::Rng` statement. The `gen_range` method takes two
23142306
numbers as arguments and generates a random number between them. It’s inclusive
23152307
on the lower bound but exclusive on the upper bound, so we need to specify `1`
23162308
and `101` to request a number between 1 and 100.
23172309
-->
2318-
<p>また、途中に2行追加もしています。<code>rand::thread_rng</code>関数は、これから使う特定の乱数生成器を返してくれます: この乱数生成器は、実行スレッドに固有で、OSにより、シード値を与えられています。
2319-
次に、この乱数生成器の<code>gen_range</code>メソッドを呼び出しています。このメソッドは、
2310+
<p>次に、途中に2行を追加しています。<code>rand::thread_rng</code>関数は、これから使う特定の乱数生成器を返してくれます: この乱数生成器は、実行スレッドに固有で、OSにより、シード値を与えられています。
2311+
そして、この乱数生成器の<code>gen_range</code>メソッドを呼び出しています。このメソッドは、
23202312
<code>use rand::Rng</code>文でスコープに導入した<code>Rng</code>トレイトで定義されています。<code>gen_range</code>メソッドは二つの数字を引数に取り、
23212313
それらの間の乱数を生成してくれます。範囲は下限値を含み、上限値を含まないため、<code>1</code>と<code>101</code>と指定しないと1から100の範囲の数字は得られません。</p>
23222314
<!--
@@ -2384,9 +2376,7 @@ <h2><a class="header" href="#予想と秘密の数字を比較する" id="予想
23842376
<span class="filename">Filename: src/main.rs</span>
23852377
-->
23862378
<p><span class="filename">ファイル名: src/main.rs</span></p>
2387-
<pre><code class="language-rust ignore">extern crate rand;
2388-
2389-
use std::io;
2379+
<pre><code class="language-rust ignore">use std::io;
23902380
use std::cmp::Ordering;
23912381
use rand::Rng;
23922382

@@ -2894,11 +2884,9 @@ <h3><a class="header" href="#不正な入力を処理する" id="不正な入力
28942884
<span class="filename">Filename: src/main.rs</span>
28952885
-->
28962886
<p><span class="filename">ファイル名: src/main.rs</span></p>
2897-
<pre><code class="language-rust ignore">extern crate rand;
2898-
2899-
use std::io;
2887+
<pre><code class="language-rust ignore">use rand::Rng;
29002888
use std::cmp::Ordering;
2901-
use rand::Rng;
2889+
use std::io;
29022890

29032891
fn main() {
29042892
println!(&quot;Guess the number!&quot;);
@@ -2910,7 +2898,8 @@ <h3><a class="header" href="#不正な入力を処理する" id="不正な入力
29102898

29112899
let mut guess = String::new();
29122900

2913-
io::stdin().read_line(&amp;mut guess)
2901+
io::stdin()
2902+
.read_line(&amp;mut guess)
29142903
.expect(&quot;Failed to read line&quot;);
29152904

29162905
let guess: u32 = match guess.trim().parse() {

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)