Set a switch entry
(&mut self, index: EntryIndex, block: Block)
| 53 | |
| 54 | /// Set a switch entry |
| 55 | pub fn set_entry(&mut self, index: EntryIndex, block: Block) { |
| 56 | let prev = self.cases.insert(index, block); |
| 57 | assert!(prev.is_none(), "Tried to set the same entry {index} twice"); |
| 58 | } |
| 59 | |
| 60 | /// Get a reference to all existing entries |
| 61 | pub fn entries(&self) -> &HashMap<EntryIndex, Block> { |