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

Clippy suggest Rc<Box<T>> -> Box<T> #5722

Closed
mahkoh opened this issue Jun 16, 2020 · 1 comment · Fixed by #5899
Closed

Clippy suggest Rc<Box<T>> -> Box<T> #5722

mahkoh opened this issue Jun 16, 2020 · 1 comment · Fixed by #5899
Labels
C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages

Comments

@mahkoh
Copy link

mahkoh commented Jun 16, 2020

use std::rc::Rc;

#[derive(Clone)]
pub struct X {
    pub f: Rc<Box<[u8]>>, // try: `Box<[u8]>`
}

Should be Rc<[u8]>.

@flip1995 flip1995 added C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Jun 22, 2020
@JarredAllen
Copy link
Contributor

I can implement this.

bors added a commit that referenced this issue Aug 12, 2020
Change Rc<Box<T>> recommendation to be Rc<T> instead of Box<T>

Changelog: Fixes #5722
@bors bors closed this as completed in d5f5487 Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants