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

Allow clippy::trivially_copy_pass_by_ref #120

Closed
Kestrer opened this issue Aug 17, 2020 · 0 comments · Fixed by #121
Closed

Allow clippy::trivially_copy_pass_by_ref #120

Kestrer opened this issue Aug 17, 2020 · 0 comments · Fixed by #121

Comments

@Kestrer
Copy link

Kestrer commented Aug 17, 2020

async-trait copies the method definitions as non-trait methods, which can result in the clippy::trivially_copy_pass_by_ref warning being incorrect fired. Example:

#[async_trait]
trait Foo {
    fn foo(&self);
}

#[async_trait]
// ^ clippy::trivially_copy_pass_by_ref warning since the internal `foo` isn't part of the trait
impl Foo for () {
    fn foo(&self) {}
}
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.

1 participant