-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rust 1.35.0付属のrustfmt 1.2.0-stableとclippy 0.0.212に対応 #37
Conversation
問題の箇所を以下の2行に分けても (
以下の2行だと
もしかしたら clippy の偽陽性かもしれません。調べてみます。 |
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.
clippy のバグのようなので、いずれ元に戻したいです。
当面は、以下の2種類のうちどちらでも良いような気がします:
#[allow(clippy::identity_conversion)]
を付ける- 2行に分けて
#[allow(clippy::identity_conversion)]
を付けない
いずれ戻す旨のコメントも付けていただけると幸いです。
src/storage/journal/region.rs
Outdated
@@ -329,6 +329,7 @@ where | |||
} | |||
|
|||
/// リングバッファおよびインデックスを前回の状態に復元する. | |||
#[allow(clippy::identity_conversion)] |
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 式だけなので、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.
確かにInner attributeにした方が良いですね。
attributeをつけつつ、後々で外すというコメントも記載する対応でいきたいと思います。
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.
LGTM です!
このPRの狙い
Rust 1.35.0にバージョンが上がり、clippyのバージョンが以下のようになりました
これに伴い以下のようなwarningが生じています:
これを解決します。
内容
解決するといっても
track!
を取り除くことはできないので、clippy::identity_conversion
をallowしました。追加の変更点
Rust fmtがしばらく実行されていなかったようなので、これも併せて実行します。