Skip to content

Commit 6fa620e

Browse files
author
Stephan Dilly
committed
more docs
1 parent 8825666 commit 6fa620e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

asyncgit/src/sync/diff.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ use git2::{
99
use scopetime::scope_time;
1010
use std::{fs, path::Path};
1111

12-
///
12+
/// type of diff of a single line
1313
#[derive(Copy, Clone, PartialEq, Hash)]
1414
pub enum DiffLineType {
15-
///
15+
/// just surrounding line, no change
1616
None,
17-
///
17+
/// header of the hunk
1818
Header,
19-
///
19+
/// line added
2020
Add,
21-
///
21+
/// line deleted
2222
Delete,
2323
}
2424

@@ -56,16 +56,16 @@ impl From<DiffHunk<'_>> for HunkHeader {
5656
}
5757
}
5858

59-
///
59+
/// single diff hunk
6060
#[derive(Default, Clone, Hash)]
6161
pub struct Hunk {
62-
///
62+
/// hash of the hunk header
6363
pub header_hash: u64,
64-
///
64+
/// list of `DiffLine`s
6565
pub lines: Vec<DiffLine>,
6666
}
6767

68-
///
68+
/// collection of hunks, sum of all diff lines
6969
#[derive(Default, Clone, Hash)]
7070
pub struct FileDiff {
7171
/// list of hunks

0 commit comments

Comments
 (0)