In general, `create_unchecked_context()` should not return errors, but we still make the result type Result for uniformity.
()
| 4607 | /// In general, `create_unchecked_context()` should not return errors, but |
| 4608 | /// we still make the result type Result<Context> for uniformity. |
| 4609 | pub(super) fn create_unchecked_context() -> Result<Context> { |
| 4610 | Ok(Context { |
| 4611 | body: Arc::new(AtomicRefCell::new(ContextBody { |
| 4612 | finalized: false, |
| 4613 | graphs: vec![], |
| 4614 | main_graph: None, |
| 4615 | graphs_names: HashMap::new(), |
| 4616 | graphs_names_inverse: HashMap::new(), |
| 4617 | nodes_names: HashMap::new(), |
| 4618 | nodes_names_inverse: HashMap::new(), |
| 4619 | graphs_annotations: HashMap::new(), |
| 4620 | nodes_annotations: HashMap::new(), |
| 4621 | type_checker: None, |
| 4622 | total_size_nodes: 0, |
| 4623 | })), |
| 4624 | }) |
| 4625 | } |
| 4626 | |
| 4627 | /// Creates an empty computation context. |
| 4628 | /// |
no outgoing calls