diff --git a/client/consensus/poc/src/verification.rs b/client/consensus/poc/src/verification.rs index 750e7371f0b52..a213f5506ff5e 100644 --- a/client/consensus/poc/src/verification.rs +++ b/client/consensus/poc/src/verification.rs @@ -80,10 +80,10 @@ where .unwrap_or_else(|| find_pre_digest::(&header))?; trace!(target: "poc", "Checking header"); - let seal = match header.digest_mut().pop() { - Some(x) => x, - None => return Err(poc_err(Error::HeaderUnsealed(header.hash()))), - }; + let seal = header + .digest_mut() + .pop() + .ok_or_else(|| poc_err(Error::HeaderUnsealed(header.hash())))?; let sig = seal .as_poc_seal()