-
Notifications
You must be signed in to change notification settings - Fork 469
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
fix: lint issues in 1.52.0 #543
Conversation
TommyCpp
commented
May 8, 2021
- Also bumped the MSRV according to the README
); | ||
} | ||
|
||
for entry in dict.into_iter().flatten() { |
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.
Maybe rewrite this to collect() while you're at it? Potentially more efficient to allocate the correct size immediately.
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.
Sounds good to me. But I thought the compiler could allocate the correct size with for loop also?
Codecov Report
@@ Coverage Diff @@
## main #543 +/- ##
=====================================
Coverage 52.2% 52.2%
=====================================
Files 96 96
Lines 8506 8506
=====================================
Hits 4447 4447
Misses 4059 4059
Continue to review full report at Codecov.
|
94422be
to
7228628
Compare
let _ = dict | ||
.into_iter() | ||
.flatten() | ||
.map(|entry| { |
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.
I meant you could collect into map
directly by yielding (entry.path(), std::fs::read_to_string())
items.
7228628
to
2bcabf3
Compare