require-impl-method-order
HintIn an inherent impl, put new first and public methods before private ones.
impl AuthenticationGuard { pub fn related(role: Role) -> Self { return Self { role }; } pub fn new() -> Self { return Self; }}impl AuthenticationGuard { fn verify(&self) {} pub fn related(role: Role) -> Self { return Self { role }; }}impl AuthenticationGuard { pub fn new() -> Self { return Self; } pub fn related(role: Role) -> Self { return Self { role }; } fn verify(&self) {}}impl Guard for AuthenticationGuard { fn check(&self) {} fn new() -> Self { return Self; }}How to fix
In an inherent impl block, new is the first method and every pub method comes before the private ones. The rule skips trait impls because their methods have no visibility.