Method
version
(&mut self, expected: u8, model: &'static str)
Source from the content-addressed store, hash-verified
| 1706 | Self { bytes, cursor: 0 } |
| 1707 | } |
| 1708 | fn version(&mut self, expected: u8, model: &'static str) -> Result<(), ProjectTreeError> { |
| 1709 | let found = self.u8()?; |
| 1710 | if found == expected { |
| 1711 | Ok(()) |
| 1712 | } else { |
| 1713 | Err(ProjectTreeError::UnsupportedVersion { |
| 1714 | model, |
| 1715 | found, |
| 1716 | expected, |
| 1717 | }) |
| 1718 | } |
| 1719 | } |
| 1720 | fn u8(&mut self) -> Result<u8, ProjectTreeError> { |
| 1721 | let value = *self |
| 1722 | .bytes |