(
repo: &Repository,
hash: &Hash,
path: &str,
side: &str,
bytes: &mut usize,
)
| 358 | } |
| 359 | |
| 360 | fn read_source( |
| 361 | repo: &Repository, |
| 362 | hash: &Hash, |
| 363 | path: &str, |
| 364 | side: &str, |
| 365 | bytes: &mut usize, |
| 366 | ) -> SourceText { |
| 367 | let result = if side == "before" { |
| 368 | repo.get_file_content_before_change(path, hash) |
| 369 | } else { |
| 370 | repo.get_file_content_after_change(path, hash) |
| 371 | }; |
| 372 | source_text(result, bytes) |
| 373 | } |
| 374 | |
| 375 | fn source_text( |
| 376 | result: Result<Option<Vec<u8>>, atomic_repository::RepositoryError>, |
no test coverage detected