Unwrap the `Pad` variant. # Panics If `self` is a variant other than [`PaddedData::Pad`].
(self)
| 402 | /// # Panics |
| 403 | /// If `self` is a variant other than [`PaddedData::Pad`]. |
| 404 | pub fn unwrap(self) -> (&'a [Array<u8, BlockSize>], Array<u8, BlockSize>) { |
| 405 | match self { |
| 406 | PaddedData::Pad { blocks, tail_block } => (blocks, tail_block), |
| 407 | PaddedData::NoPad { .. } => { |
| 408 | panic!("Expected `PaddedData::Pad`, but got `PaddedData::NoPad`"); |
| 409 | } |
| 410 | PaddedData::Error => { |
| 411 | panic!("Expected `PaddedData::Pad`, but got `PaddedData::Error`"); |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | } |
no outgoing calls