(&mut self)
| 247 | // } |
| 248 | |
| 249 | pub fn get_commits(&mut self) -> Result<Vec<CommitListItem>, io::Error> { |
| 250 | let start = 0; |
| 251 | let end = u64::MAX; |
| 252 | |
| 253 | let commits = self |
| 254 | .commit_list |
| 255 | .get_range(start, end) |
| 256 | .expect("Error getting commits"); |
| 257 | |
| 258 | Ok(commits.into_iter().map(|(_, v)| v).collect()) |
| 259 | } |
| 260 | |
| 261 | pub fn get_commit(&mut self, hash: u64) -> Result<Option<CommitListItem>, io::Error> { |
| 262 | match self.commit_list.search(hash) { |