-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thinggood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Hello
Today, I created a struct with some public interface. Internally, I want to use it a bit like iterator, so I implemented a private fn next(&mut self) -> Option<T>
helper method. This is on purpose to mimic the Iterator
trait.
Clippy tells me that I should implement the trait. But that would make the next
method effectively public interface, which I don't want.
In that sense, it seems like a false positive to me ‒ should the lint be triggered only on public methods if the trait is public? Or is my use case too odd?
To show the real code, here is the commit:
vorner/corona@cb01227#diff-40d2d23f45cd6212d2b8a20a61048c94R88
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thinggood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy