require-impl-after-trait
WarningWhen a file declares and implements a trait, the first impl comes right after the trait.
pub trait ConnectionExtension<D> { fn transaction(&self);}pub struct Other;impl<D> ConnectionExtension<D> for Pool<D> { fn transaction(&self) {}}pub trait PgPoolExtension { fn create() -> Self;}impl PgPoolExtension for PgPool { fn create() -> Self { return x; }}pub trait ConnectionExtension<D> { fn transaction(&self);}#[allow(clippy::unused_async, reason = "the trait requires async")]impl<D> ConnectionExtension<D> for Pool<D> { fn transaction(&self) {}}pub trait Connector { fn name(&self) -> &str;}How to fix
When a file declares and implements a trait, put the first impl before any other item that follows the declaration.