(&mut self)
| 79 | } |
| 80 | |
| 81 | pub fn read_u16(&mut self) -> Result<u16> { |
| 82 | let data = self.read_n()?; |
| 83 | match self.endian { |
| 84 | Endian::Little => Ok(u16::from_le_bytes(data)), |
| 85 | Endian::Big => Ok(u16::from_be_bytes(data)), |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | pub fn read_u32(&mut self) -> Result<u32> { |
| 90 | let data = self.read_n()?; |
no test coverage detected