-
Notifications
You must be signed in to change notification settings - Fork 4
リファレンス追加: std::vec::IntoIter および vecモジュールの誤字修正 #16
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
base: main
Are you sure you want to change the base?
Conversation
|
今回はPRありがとうございます。 |
KaiTomotake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特に問題はなさそうです。
PRありがとうございました!
|
すみません、一つ問題が発生しまして・・・ |
|
@okakatsuo |
|
@KaiTomotake |
|
署名付きコミットへの書き換えが完了いたしました。 |
Signed-off-by: hinshi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
わざわざありがとうございます.
ただ,SUMMARY.md のリファレンスに
- [IntoIter](./vec/IntoIter.md)
が抜けているため,記事が生成されないようです.
また,新しいコミットには署名がついているのですが,
過去のコミットが消されていないため署名がついていないこととなっています.
これについてはこちらで検討します.
|
ご指摘ありがとうございます。 |
|
ありがとうございます. |
hinshiba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
構造体への実装のexに日本語の追加の説明があって丁寧で非常に良いと思います.
ただ,1つめの例は誤解を招きそうに思えました.
意見を聞かせていただけると幸いです.
| let v = vec![0, 1, 2]; | ||
| // vの所有権がiterに移動する | ||
| let iter: std::vec::IntoIter<i32> = v.into_iter(); | ||
|
|
||
| // 所有権を持っているので、要素を直接消費できる | ||
| for x in iter { | ||
| println!("{}", x); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この例はやや誤解を招くように思えます.
ここで要素を消費しているのはforだと思いますが,println!()があるのでそちらが消費するように見えてしまうと思うのですが,どうでしょうか?
もちろんforにコメントがついていると言われればそれまでですが
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
言いたいことはすでにhinshibaさんが言ってくださっているので私から特に言うことはありません。
修正が必要な箇所を発見しましたのでやりなおし
KaiTomotake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
申し訳ありません。ついこの間追加したルールで「サポートされているバージョンを明記する」というものがあります。もう一度vecモジュールの部分を見てもらいそれを参考にして、バージョンセクションを追記してもらえればと思います。
概要
構造体
std::vec::IntoIterのリファレンスページの新規作成とvecモジュール内の既存のタイポ修正を行いました。変更内容
src/vec/IntoIter.mdを作成。SpliteをSpliceに修正。InteratorをIteratorに修正。関連Issue
チェックリスト
mdbook buildを実行して確認したレビューで見てほしい点
IntoIterの記述ルールが、テンプレートであるvecモジュールの形式と一致しているか。