Method
version
(&mut self, expected: u8, model: &'static str)
Source from the content-addressed store, hash-verified
| 1688 | Self { bytes, cursor: 0 } |
| 1689 | } |
| 1690 | fn version(&mut self, expected: u8, model: &'static str) -> Result<(), ProjectTreeError> { |
| 1691 | let found = self.u8()?; |
| 1692 | if found == expected { |
| 1693 | Ok(()) |
| 1694 | } else { |
| 1695 | Err(ProjectTreeError::UnsupportedVersion { |
| 1696 | model, |
| 1697 | found, |
| 1698 | expected, |
| 1699 | }) |
| 1700 | } |
| 1701 | } |
| 1702 | fn u8(&mut self) -> Result<u8, ProjectTreeError> { |
| 1703 | let value = *self |
| 1704 | .bytes |