Skip to content

Commit 1182f51

Browse files
committed
resolve some warnings
1 parent 48a12ab commit 1182f51

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

text/diff_util/change.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,7 @@ pub enum Change {
2020
Substitute(ChangeData),
2121
}
2222

23-
pub struct ChangeContext {
24-
pub change: Change,
25-
pub ln1_start: usize,
26-
pub ln1_end: usize,
27-
pub hk1_start: usize,
28-
pub hk1_end: usize,
29-
pub ln2_start: usize,
30-
pub ln2_end: usize,
31-
pub hk2_start: usize,
32-
pub hk2_end: usize,
33-
}
34-
3523
impl Change {
36-
pub fn is_none(&self) -> bool {
37-
*self == Change::None
38-
}
39-
40-
pub fn is_unchanged(&self) -> bool {
41-
*self == Change::Unchanged(Default::default())
42-
}
4324

4425
pub fn get_ln1(&self) -> usize {
4526
match self {

text/diff_util/file_diff.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ impl<'a> FileDiff<'a> {
9393
&mut lcs_indices,
9494
);
9595

96-
println!("lcs_indices: {:?}", lcs_indices);
9796
diff.hunks
9897
.create_hunks_from_lcs(&lcs_indices, num_lines1, num_lines2);
9998

text/diff_util/hunks.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ impl Hunks {
283283
num_lines2: usize,
284284
) {
285285
let mut hunk_start1 = 0;
286-
let mut hunk_end1 = 0;
286+
let mut hunk_end1: usize;
287287
let mut hunk_start2 = 0;
288-
let mut hunk_end2 = 0;
288+
let mut hunk_end2: usize;
289289
let mut prev_val = 0 as i32;
290290
for i in 0..lcs_indices.len() {
291-
if ((lcs_indices[i] == -1) && (prev_val != -1)) {
291+
if (lcs_indices[i] == -1) && (prev_val != -1) {
292292
// We reach a new deletion/substitution block
293293
hunk_start1 = i;
294294
hunk_start2 = if prev_val == 0 {

0 commit comments

Comments
 (0)