File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,16 @@ use git2::{
9
9
use scopetime:: scope_time;
10
10
use std:: { fs, path:: Path } ;
11
11
12
- ///
12
+ /// type of diff of a single line
13
13
#[ derive( Copy , Clone , PartialEq , Hash ) ]
14
14
pub enum DiffLineType {
15
- ///
15
+ /// just surrounding line, no change
16
16
None ,
17
- ///
17
+ /// header of the hunk
18
18
Header ,
19
- ///
19
+ /// line added
20
20
Add ,
21
- ///
21
+ /// line deleted
22
22
Delete ,
23
23
}
24
24
@@ -56,16 +56,16 @@ impl From<DiffHunk<'_>> for HunkHeader {
56
56
}
57
57
}
58
58
59
- ///
59
+ /// single diff hunk
60
60
#[ derive( Default , Clone , Hash ) ]
61
61
pub struct Hunk {
62
- ///
62
+ /// hash of the hunk header
63
63
pub header_hash : u64 ,
64
- ///
64
+ /// list of `DiffLine`s
65
65
pub lines : Vec < DiffLine > ,
66
66
}
67
67
68
- ///
68
+ /// collection of hunks, sum of all diff lines
69
69
#[ derive( Default , Clone , Hash ) ]
70
70
pub struct FileDiff {
71
71
/// list of hunks
You can’t perform that action at this time.
0 commit comments