-
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
lints: clarify rc_buffer and add caveats #6090
lints: clarify rc_buffer and add caveats #6090
Conversation
This didn't display some types properly in the docs due the lack of code formatting. Also, refs for the caveat: rust-lang#6044 (comment) http-rs/surf#242
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ebroto (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
cc @yaahc, since she reviewed the original pr. |
looks great, @bors r+ |
📌 Commit 00e641b has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Downgrade rc_buffer to restriction I think Arc\<Vec\<T\>\> and Arc\<String\> and similar are a totally reasonable data structure, as observed by others in the comments on [#6044](#6044 (comment)) as well. Doing `Arc::make_mut(&mut self.vec).push(...)` or `Arc::make_mut(&mut self.string).push_str("...")` is a terrific and well performing copy-on-write pattern. Linting this with an enabled-by-default <kbd>performance</kbd> lint strikes me as an unacceptable false positive balance. As of #6090 the documentation of this lint now contains: > **Known problems:** This pattern can be desirable ... which should indicate that we shouldn't be linting against correct, reasonable, well-performing patterns with an enabled-by-default lint. Mentioning #6044, #6090. r? `@yaahc,` who reviewed the lint. --- changelog: Remove rc_buffer from default set of enabled lints
This didn't display some types properly in the docs due the lack of code formatting.
Also, refs for the caveat:
#6044 (comment)
http-rs/surf#242
Fwiw I can't get
cargo test
to run, even on nightly. I get:Please keep the line below
changelog: none, nightly