()
| 44 | )); |
| 45 | |
| 46 | fn parse_embedded_spec() -> (bool, HashMap<u64, ErrorSpec>) { |
| 47 | match serde_json::from_str::<Vec<ErrorSpec>>(&ERROR_JSON) { |
| 48 | Ok(x) => (true, x.into_iter().map(|x| (x.id, x)).collect()), |
| 49 | Err(e) => { |
| 50 | tracing::error!("Failed to parse embedded `errors.json`: {e:?}"); |
| 51 | return (false, HashMap::new()); |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | lazy_static! { |
| 57 | static ref SPECS: (bool, HashMap<u64, ErrorSpec>) = parse_embedded_spec(); |
nothing calls this directly
no outgoing calls
no test coverage detected