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

linkedlist lint should not warn when implementing a trait for LinkedList #605

Closed
fhartwig opened this issue Jan 31, 2016 · 2 comments · Fixed by #1393
Closed

linkedlist lint should not warn when implementing a trait for LinkedList #605

fhartwig opened this issue Jan 31, 2016 · 2 comments · Fixed by #1393

Comments

@fhartwig
Copy link
Contributor

Running clippy on serde results in the following warning:

src/ser/impls.rs:291:23: 291:36 warning: I see you're using a LinkedList! Perhaps you meant some other data structure?, #[warn(linkedlist)] on by default
src/ser/impls.rs:291 impl<T> Serialize for LinkedList<T>
                                           ^~~~~~~~~~~~~
src/ser/impls.rs:291:23: 291:36 help: a VecDeque might work
for further information visit https://github.com/Manishearth/rust-clippy/wiki#linkedlist

Ignoring my general reservations against this lint, a trait impl on LinkedList isn't the same as using a linked list, so I think we should ignore cases like this.

@birkenfeld
Copy link
Contributor

👍

@mcarton
Copy link
Member

mcarton commented Jan 31, 2016

I already noticed that on quickcheck in #553. I’ll make a PR tomorrow (EDIT: for some definition of tomorrow).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants