refactor: statically guarantee that current error codes are documented

This commit is contained in:
Ezra Shaw 2023-02-25 20:14:10 +13:00
parent 70fd012439
commit 90677edcba
No known key found for this signature in database
GPG key ID: 67ABF16FB0ECD870
8 changed files with 33 additions and 67 deletions

View file

@ -580,7 +580,7 @@ impl DiagnosticCode {
let je_result =
je.registry.as_ref().map(|registry| registry.try_find_description(&s)).unwrap();
DiagnosticCode { code: s, explanation: je_result.unwrap_or(None) }
DiagnosticCode { code: s, explanation: je_result.ok() }
})
}
}