(
key: &[u8; WorkingCopyId::SIZE],
bytes: &[u8],
)
| 92 | } |
| 93 | |
| 94 | fn decode_working_copy_row( |
| 95 | key: &[u8; WorkingCopyId::SIZE], |
| 96 | bytes: &[u8], |
| 97 | ) -> PristineResult<WorkingCopyRecord> { |
| 98 | let key_id = WorkingCopyId::from_bytes(*key); |
| 99 | let record = decode_working_copy_record(bytes)?; |
| 100 | if record.id != key_id { |
| 101 | return Err(PristineError::Inconsistent { |
| 102 | message: format!( |
| 103 | "WORKING_COPIES key {} contains record for {}", |
| 104 | key_id, record.id |
| 105 | ), |
| 106 | }); |
| 107 | } |
| 108 | Ok(record) |
| 109 | } |
| 110 | |
| 111 | impl ReadTxn { |
| 112 | /// Create a new read transaction |
no test coverage detected