aboutsummaryrefslogtreecommitdiff
path: root/bin/src/explain.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/src/explain.rs')
-rw-r--r--bin/src/explain.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/src/explain.rs b/bin/src/explain.rs
index de171aa..bcb8eed 100644
--- a/bin/src/explain.rs
+++ b/bin/src/explain.rs
@@ -1,11 +1,10 @@
1use crate::err::ExplainErr; 1use crate::{err::ExplainErr, utils};
2
3use lib::LINTS;
4 2
5pub fn explain(code: u32) -> Result<&'static str, ExplainErr> { 3pub fn explain(code: u32) -> Result<&'static str, ExplainErr> {
4 let lints = utils::lint_map();
6 match code { 5 match code {
7 0 => Ok("syntax error"), 6 0 => Ok("syntax error"),
8 _ => LINTS 7 _ => lints
9 .values() 8 .values()
10 .flatten() 9 .flatten()
11 .find(|l| l.code() == code) 10 .find(|l| l.code() == code)