We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d50bdab commit abe3eafCopy full SHA for abe3eaf
src/patch.rs
@@ -139,7 +139,7 @@ impl Patch {
139
}
140
141
/// Get a DiffHunk and its total line count from the Patch.
142
- pub fn hunk(&mut self, hunk_idx: usize) -> Result<(DiffHunk, usize), Error> {
+ pub fn hunk(&self, hunk_idx: usize) -> Result<(DiffHunk, usize), Error> {
143
let mut ret = ptr::null();
144
let mut lines = 0;
145
unsafe {
@@ -156,7 +156,7 @@ impl Patch {
156
157
158
/// Get a DiffLine from a hunk of the Patch.
159
- pub fn line_in_hunk(&mut self,
+ pub fn line_in_hunk(&self,
160
hunk_idx: usize,
161
line_of_hunk: usize) -> Result<DiffLine, Error> {
162
0 commit comments