-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add lint on File::read_to_string and File::read_to_end #5272
Conversation
☔ The latest upstream changes (presumably #5230) made this pull request unmergeable. Please resolve the merge conflicts. |
3e7eab7
to
1499f73
Compare
☔ The latest upstream changes (presumably #5276) made this pull request unmergeable. Please resolve the merge conflicts. |
1499f73
to
0f7f307
Compare
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 overall
b6dca14
to
ccfc8de
Compare
I'm guessing something like
would make the doctest happy? (though wouldn't it then fail on |
/// | ||
/// ```rust | ||
/// # use std::fs::File; | ||
/// let mut f = File::open("foo.txt")?; |
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.
Just use .unwrap()
here, instead of ?
.
be94542
to
371886a
Compare
371886a
to
a4ba102
Compare
@bors r+ |
📌 Commit a4ba102 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Adds lint
verbose_file_reads
which checks for use of File::read_to_end and File::read_to_string.Closes #4916
changelog: add lint on File::{read_to_end, read_to_string}