Skip to content
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

Improve documentation of borrowed_box #8161

Closed
flip1995 opened this issue Dec 23, 2021 · 2 comments · Fixed by #8262
Closed

Improve documentation of borrowed_box #8161

flip1995 opened this issue Dec 23, 2021 · 2 comments · Fixed by #8262
Labels
A-documentation Area: Adding or improving documentation good-first-issue These issues are a good way to get started with Clippy

Comments

@flip1995
Copy link
Member

Description

This came up in #3971.

The documentation could need some improvement. It should mention, that by removing the Box from &Box<T>, you no longer have to box the parameter when it is passed to the function. For more information, see the discussion in #3971.

Version

No response

Additional Labels

No response

@flip1995 flip1995 added good-first-issue These issues are a good way to get started with Clippy A-documentation Area: Adding or improving documentation labels Dec 23, 2021
@1nF0rmed
Copy link
Contributor

1nF0rmed commented Jan 6, 2022

If I understand correctly, there needs to be a change in the "Why is this bad?" section here, where it elaborates more on how removing Box from a function parameter can generalize the function.

Would that be right?

@flip1995
Copy link
Member Author

Yes, exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants