Convert the returned error from set_mathml, etc., to a useful string for display
(e:&Error)
| 341 | |
| 342 | /// Convert the returned error from set_mathml, etc., to a useful string for display |
| 343 | pub fn errors_to_string(e:&Error) -> String { |
| 344 | let mut result = String::default(); |
| 345 | let mut first_time = true; |
| 346 | for e in e.iter() { |
| 347 | if first_time { |
| 348 | result = format!("{}\n", e); |
| 349 | first_time = false; |
| 350 | } else { |
| 351 | result += &format!("caused by: {}\n", e); |
| 352 | } |
| 353 | } |
| 354 | return result; |
| 355 | } |
| 356 | |
| 357 | |
| 358 | fn add_ids(mathml: Element) -> Element { |
no outgoing calls
no test coverage detected