(reader: &mut impl Read)
| 49 | |
| 50 | impl IndexPtr { |
| 51 | fn read(reader: &mut impl Read) -> io::Result<Self> { |
| 52 | let mut buffer = [0u8; 8]; |
| 53 | reader.read_exact(&mut buffer)?; |
| 54 | |
| 55 | Ok(IndexPtr { |
| 56 | offset: u32::from_le_bytes(buffer[0..4].try_into().unwrap()), |
| 57 | file_id: u32::from_le_bytes(buffer[4..8].try_into().unwrap()), |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | fn is_absent(&self) -> bool { |
| 62 | self.offset == u32::MAX || self.file_id == u32::MAX |
nothing calls this directly
no outgoing calls
no test coverage detected