| 52 | } |
| 53 | |
| 54 | pub fn supports(self, language: Language) -> bool { |
| 55 | match self { |
| 56 | Self::Syntax => true, |
| 57 | Self::RustPlaceholder => language == Language::Rust, |
| 58 | Self::EmptyCatch => matches!(language, Language::TypeScript | Language::Tsx), |
| 59 | Self::FailureMasking | Self::DuplicatedBehavior | Self::AsyncResourceSafety => { |
| 60 | matches!( |
| 61 | language, |
| 62 | Language::Rust | Language::TypeScript | Language::Tsx |
| 63 | ) |
| 64 | } |
| 65 | Self::UnnecessaryMachinery | Self::WeakVerification | Self::UnsafeShortcuts => { |
| 66 | language == Language::Rust |
| 67 | } |
| 68 | Self::Manageability => true, |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | pub fn summary(self) -> &'static str { |
| 73 | match self { |