(&mut self)
| 1454 | } |
| 1455 | |
| 1456 | fn read_file_state(&mut self) -> Result<FileState, OperationCodecError> { |
| 1457 | let kind = match self.read_u8()? { |
| 1458 | 0 => FileKind::Regular, |
| 1459 | 1 => FileKind::Directory, |
| 1460 | 2 => FileKind::Symlink, |
| 1461 | 3 => FileKind::Gitlink, |
| 1462 | tag => { |
| 1463 | return Err(OperationCodecError::new(format!( |
| 1464 | "unsupported file kind tag {tag}" |
| 1465 | ))) |
| 1466 | } |
| 1467 | }; |
| 1468 | Ok(FileState { |
| 1469 | kind, |
| 1470 | mode: self.read_u32()?, |
| 1471 | content: self.read_hash()?, |
| 1472 | }) |
| 1473 | } |
| 1474 | |
| 1475 | fn read_receipt_kind(&mut self) -> Result<EffectReceiptKind, OperationCodecError> { |
| 1476 | match self.read_u8()? { |
no test coverage detected