(mathml: Element<'m>, nav_state: &RefMut<NavigationState>)
| 378 | }); |
| 379 | |
| 380 | fn get_start_node<'m>(mathml: Element<'m>, nav_state: &RefMut<NavigationState>) -> Result<Element<'m>> { |
| 381 | let start_node_id = match nav_state.top() { |
| 382 | None => mathml.attribute_value("id").unwrap().to_string(), |
| 383 | Some( (position, _) ) => position.current_node.clone(), |
| 384 | }; |
| 385 | |
| 386 | return match get_node_by_id(mathml, &start_node_id) { |
| 387 | Some(node) => Ok(node), |
| 388 | None => { |
| 389 | bail!("Internal Error: didn't find id '{}' while attempting to start navigation", &start_node_id); |
| 390 | } |
| 391 | }; |
| 392 | } |
| 393 | |
| 394 | |
| 395 |
no test coverage detected