Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve translation of mid of ch15-02 #149

Merged
merged 2 commits into from
Apr 18, 2021

Conversation

m-shaka
Copy link

@m-shaka m-shaka commented Apr 17, 2021

15-02の"Defining` Our Own Smart Pointer"からの2セクションを直しました

コンパイラは、`*`演算子を`deref`メソッド、それから何の変哲もない参照外しの呼び出しに置き換えるので、
`deref`メソッドを呼び出す必要があるかどうかを考える必要はないわけです。このRustの機能により、
普通の参照か`Deref`を実装した型であるかどうかに関わらず、等しく機能するコードを書かせてくれます。
Rustが`*`演算子を`deref`メソッドの呼び出しと普通の参照外しへと置き換えてくれるので、
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

元の訳だと「derefの呼び出しに置き換えてから参照外しにまた置き換える」ような印象を与える。上の説明を読めばどんな置き換えかわかるので、無理にthenを訳さないことにしました

@tatsuya6502 tatsuya6502 self-requested a review April 18, 2021 03:32
@tatsuya6502 tatsuya6502 self-assigned this Apr 18, 2021
Copy link
Member

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。2点コメントしましたので、ご確認をお願いします。

src/ch15-02-deref.md Outdated Show resolved Hide resolved
src/ch15-02-deref.md Outdated Show resolved Hide resolved
Co-authored-by: Tatsuya Kawano <tatsuya@hibaridb.org>
Copy link
Member

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビューOKですのでマージします。

おつかれさまでした!

@tatsuya6502 tatsuya6502 merged commit 557d71f into rust-lang-ja:master-ja Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants