File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ impl DiagnosticsConfig {
4848 /// 1. Exact match (e.g., "S100")
4949 /// 2. Longest prefix match (e.g., "S1" over "S")
5050 /// 3. Default: Error
51+ #[ must_use]
5152 pub fn get_severity ( & self , code : & str ) -> DiagnosticSeverity {
5253 // First, check for exact match
5354 if let Some ( & severity) = self . severity . get ( code) {
@@ -72,11 +73,11 @@ impl DiagnosticsConfig {
7273 }
7374
7475 best_match
75- . map ( |( _, severity) | severity)
76- . unwrap_or ( DiagnosticSeverity :: Error )
76+ . map_or ( DiagnosticSeverity :: Error , |( _, severity) | severity)
7777 }
7878
7979 /// Check if a diagnostic should be shown (severity is not Off).
80+ #[ must_use]
8081 pub fn is_enabled ( & self , code : & str ) -> bool {
8182 self . get_severity ( code) != DiagnosticSeverity :: Off
8283 }
You can’t perform that action at this time.
0 commit comments