(&mut self)
| 937 | } |
| 938 | |
| 939 | pub fn read_u8(&mut self) -> Result<u8, Error> { |
| 940 | let mut buf: [u8; 1] = [0; 1]; |
| 941 | |
| 942 | match self.source.read_exact(&mut buf) { |
| 943 | Ok(_) => { |
| 944 | self.position += 1; |
| 945 | Ok(buf[0]) |
| 946 | }, |
| 947 | Err(err) => Err(err) |
| 948 | } |
| 949 | } |
| 950 | |
| 951 | pub fn get_u8(&mut self) -> u8 { |
| 952 | self.read_u8().unwrap_or(0) |
no outgoing calls
no test coverage detected