Expand the size of the constant data to `expected_size` number of bytes by adding zeroes in the high-order byte slots.
(mut self, expected_size: usize)
| 106 | /// Expand the size of the constant data to `expected_size` number of bytes by adding zeroes |
| 107 | /// in the high-order byte slots. |
| 108 | pub fn expand_to(mut self, expected_size: usize) -> Self { |
| 109 | if self.len() > expected_size { |
| 110 | panic!("The constant data is already expanded beyond {expected_size} bytes") |
| 111 | } |
| 112 | self.0.resize(expected_size, 0); |
| 113 | self |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | impl fmt::Display for ConstantData { |
no test coverage detected