@@ -39,12 +39,12 @@ pub enum ChangeKind {
39
39
}
40
40
41
41
#[ derive( PartialEq ) ]
42
- struct SplitScore {
42
+ struct Score {
43
43
effective_indent : i16 ,
44
44
penalty : i16 ,
45
45
}
46
46
47
- impl PartialOrd for SplitScore {
47
+ impl PartialOrd for Score {
48
48
// A score is considered "Greater" if it is equal or less than 0
49
49
fn partial_cmp ( & self , other : & Self ) -> Option < std:: cmp:: Ordering > {
50
50
let indent_penalty = match self . effective_indent . cmp ( & other. effective_indent ) {
@@ -102,7 +102,7 @@ fn get_indent(s: String) -> Option<u8> {
102
102
None
103
103
}
104
104
105
- fn measure_and_score_change < T : Display > ( lines : & [ Token ] , split : usize , interner : & Interner < T > , score : & mut SplitScore ) {
105
+ fn measure_and_score_change < T : Display > ( lines : & [ Token ] , split : usize , interner : & Interner < T > , score : & mut Score ) {
106
106
// Gather information about the surroundings of the change
107
107
let end_of_file = split >= lines. len ( ) ;
108
108
let mut indent: Option < u8 > = if split >= lines. len ( ) {
@@ -268,7 +268,7 @@ where
268
268
}
269
269
270
270
let mut best_shift: Option < usize > = None ;
271
- let mut best_score = SplitScore {
271
+ let mut best_score = Score {
272
272
effective_indent : 0 ,
273
273
penalty : 0 ,
274
274
} ;
@@ -282,7 +282,7 @@ where
282
282
}
283
283
284
284
while shift <= change. after . end {
285
- let mut score = SplitScore {
285
+ let mut score = Score {
286
286
effective_indent : 0 ,
287
287
penalty : 0 ,
288
288
} ;
0 commit comments