-
Notifications
You must be signed in to change notification settings - Fork 913
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 not to overwrite on other platforms #3971
Conversation
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, thank you!
} else { | ||
let should_insert = !mods_outside_ast | ||
.iter() | ||
.any(|(outside_path, _, _)| outside_path == &path); |
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.
Nit: sorry for being picky, but I would rather write this using all
instead of negation + any
:
let should_insert = mods_outside_ast
.iter()
.all(|(outside_path, _, _)| outside_path != &path);
Hi, does cargo-fmt 1.4.11 integrate this patch ? I encounter a bug very similar to #3956 |
#4100 implements a similar fix, and I can't reproduce the error on the latest master |
@calebcartwright do you want me to backport the tests to prevent a regression? |
Sure, that'd be great! |
Will get on that soon! |
fix: #3956