@@ -55,7 +55,6 @@ use std::borrow::Cow;
55
55
use std:: cmp:: { max, min, Ordering , Reverse } ;
56
56
use std:: collections:: { HashMap , VecDeque } ;
57
57
use std:: fmt;
58
- use std:: ops:: Range ;
59
58
use stylesheet:: Stylesheet ;
60
59
61
60
const ANONYMIZED_LINE_NUM : & str = "LL" ;
@@ -1911,9 +1910,7 @@ impl Renderer {
1911
1910
assert ! ( underline_start >= 0 && underline_end >= 0 ) ;
1912
1911
let padding: usize = max_line_num_len + 3 ;
1913
1912
for p in underline_start..underline_end {
1914
- if matches ! ( show_code_change, DisplaySuggestion :: Underline )
1915
- && is_different ( sm, & part. replacement , part. span . clone ( ) )
1916
- {
1913
+ if matches ! ( show_code_change, DisplaySuggestion :: Underline ) {
1917
1914
// If this is a replacement, underline with `~`, if this is an addition
1918
1915
// underline with `+`.
1919
1916
buffer. putc (
@@ -2955,14 +2952,6 @@ struct UnderlineParts {
2955
2952
multiline_bottom_right_with_text : char ,
2956
2953
}
2957
2954
2958
- /// Whether the original and suggested code are the same.
2959
- pub ( crate ) fn is_different ( sm : & SourceMap < ' _ > , suggested : & str , range : Range < usize > ) -> bool {
2960
- match sm. span_to_snippet ( range) {
2961
- Some ( s) => s != suggested,
2962
- None => true ,
2963
- }
2964
- }
2965
-
2966
2955
#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
2967
2956
pub enum OutputTheme {
2968
2957
Ascii ,
0 commit comments