pub trait EarlyReturns {
// Required method
fn can_skip(&self, content: &str) -> bool;
// Provided method
fn early_return_if_skippable(&self, content: &str) -> Option<LintResult> { ... }
}Expand description
Trait for implementing early returns in rules
Required Methods§
Provided Methods§
Sourcefn early_return_if_skippable(&self, content: &str) -> Option<LintResult>
fn early_return_if_skippable(&self, content: &str) -> Option<LintResult>
Returns the empty result if the rule can be skipped