| 108 | } |
| 109 | |
| 110 | pub fn correction(self) -> &'static str { |
| 111 | match self { |
| 112 | Self::Syntax => "Inspect the syntax error and verify with the language toolchain; grammar support may be incomplete", |
| 113 | Self::RustPlaceholder => "Implement the required behavior, or explicitly justify this placeholder and exercise its intended behavior", |
| 114 | Self::EmptyCatch => "Handle or propagate the failure, or document why ignoring it is correct for this requirement", |
| 115 | Self::FailureMasking => "Preserve the failure signal or make the intentional degraded-success contract explicit and test its callers", |
| 116 | Self::DuplicatedBehavior => "Check for a mistaken branch body; otherwise remove the redundant distinction only if condition evaluation and branch-local bindings are preserved", |
| 117 | Self::UnnecessaryMachinery => "Check for a real naming or architectural boundary; otherwise call the existing implementation rather than maintaining an identical private contract", |
| 118 | Self::Manageability => "Review the combined control-flow and responsibility growth; simplify cohesive paths where justified and verify relevant branches, rather than splitting solely to satisfy a count", |
| 119 | Self::AsyncResourceSafety => "Release synchronous guards before suspension, or use an appropriate async primitive; return/await failures through the owning task or promise contract", |
| 120 | Self::WeakVerification => "Exercise the requested behavior and compare its result with an independent expectation, including relevant failure cases", |
| 121 | Self::UnsafeShortcuts => "Restore validation/diagnostics or document the precise preconditions and narrow justification for the bypass, with tests of the affected boundary", |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | #[derive(Clone, Debug)] |