diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs index 3d20e9d86a..f4b73c280a 100644 --- a/lib/frontend/src/ssa.rs +++ b/lib/frontend/src/ssa.rs @@ -298,15 +298,11 @@ impl SSABuilder /// Gets the header block corresponding to an Ebb, panics if the Ebb or the header block /// isn't declared. pub fn header_block(&self, ebb: Ebb) -> Block { - match self.ebb_headers.get(ebb) { - Some(&header) => { - match header.expand() { - Some(header) => header, - None => panic!("the header block has not been defined"), - } - } - None => panic!("the ebb has not been declared"), - } + self.ebb_headers + .get(ebb) + .expect("the ebb has not been declared") + .expand() + .expect("the header block has not been defined") } /// Declares a new predecessor for an `Ebb` header block and record the branch instruction