Skip to content

Commit b60a5a9

Browse files
committed
Fix translation of 'trait' according to translation table
1 parent 50c8d5d commit b60a5a9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/error/multiple_error_types/boxing_errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The stdlib helps in boxing our errors by having `Box` implement conversion from
1515
any type that implements the `Error` trait into the trait object `Box<Error>`,
1616
via [`From`][from].
1717
-->
18-
標準ライブラリは`Box`に、[`From`][from]を介してあらゆる`Error`トレートを実装した型から`Box<Error>`トレートオブジェクトへの変換を実装させることで、エラーをboxしやすくしてくれます。
18+
標準ライブラリは`Box`に、[`From`][from]を介してあらゆる`Error`トレイトを実装した型から`Box<Error>`トレイトオブジェクトへの変換を実装させることで、エラーをboxしやすくしてくれます。
1919

2020
```rust,editable
2121
use std::error;

src/error/multiple_error_types/wrap_error.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ impl error::Error for DoubleError {
5050
// cast to the trait object `&error::Error`. This works because the
5151
// underlying type already implements the `Error` trait.
5252
// 元の実装のエラー型が原因。
53-
// `&error::Error`トレートオブジェクトに暗にキャストされる
54-
// 元となる型が`Error`トレートをすでに実装しているため問題なく動く
53+
// `&error::Error`トレイトオブジェクトに暗にキャストされる
54+
// 元となる型が`Error`トレイトをすでに実装しているため問題なく動く
5555
DoubleError::Parse(ref e) => Some(e),
5656
}
5757
}

src/error/result.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ occurs within the `main` function it will return an error code and print a debug
9898
representation of the error (using the [`Debug`] trait). The following example
9999
shows such a scenario and touches on aspects covered in [the following section].
100100
-->
101-
一方`main``Result`をリターン型とすることも可能です。エラーが`main`関数内で発生した時、エラーコードを返し、エラーに関するデバッグ表記を([`Debug`]トレートを使って)出力します。以下の例ではそのようなシナリオを示し、[この先の節]でカバーする内容に触れていきます。
101+
一方`main``Result`をリターン型とすることも可能です。エラーが`main`関数内で発生した時、エラーコードを返し、エラーに関するデバッグ表記を([`Debug`]トレイトを使って)出力します。以下の例ではそのようなシナリオを示し、[この先の節]でカバーする内容に触れていきます。
102102

103103
```rust,editable
104104
use std::num::ParseIntError;

src/error/result/result_map.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the `Err` type, we look to [`parse()`][parse], which is implemented with the
1616
[`FromStr`][from_str] trait for [`i32`][i32]. As a result, the `Err` type is
1717
specified as [`ParseIntError`][parse_int_error].
1818
-->
19-
まずは、どのようなエラー型を扱っているのかを知る必要があります。`Err`型を定めるために、[`i32`][i32]に対し[`FromStr`][from_str]トレートを使って実装された[`parse()`][parse]を見てみましょう。結果、`Err`型は[`ParseIntError`][parse_int_error]というものであることが分かります。
19+
まずは、どのようなエラー型を扱っているのかを知る必要があります。`Err`型を定めるために、[`i32`][i32]に対し[`FromStr`][from_str]トレイトを使って実装された[`parse()`][parse]を見てみましょう。結果、`Err`型は[`ParseIntError`][parse_int_error]というものであることが分かります。
2020

2121
<!--
2222
In the example below, the straightforward `match` statement leads to code

0 commit comments

Comments
 (0)