See comment on `BuilderCursor`
(&self, cursor: BuilderCursor)
| 497 | |
| 498 | /// See comment on `BuilderCursor` |
| 499 | pub fn builder(&self, cursor: BuilderCursor) -> RefMut<'_, Builder> { |
| 500 | let mut builder = self.builder.borrow_mut(); |
| 501 | // select_function does bounds checks and other relatively expensive things, so don't just call it |
| 502 | // unconditionally. |
| 503 | if builder.selected_function() != cursor.function { |
| 504 | builder.select_function(cursor.function).unwrap(); |
| 505 | } |
| 506 | if cursor.function.is_some() && builder.selected_block() != cursor.block { |
| 507 | builder.select_block(cursor.block).unwrap(); |
| 508 | } |
| 509 | builder |
| 510 | } |
| 511 | |
| 512 | pub fn has_capability(&self, capability: Capability) -> bool { |
| 513 | self.enabled_capabilities.contains(&capability) |
no outgoing calls
no test coverage detected