File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ fn transform(
185
185
// to compute the roundtrip differences
186
186
let mut buffer = Vec :: new ( ) ;
187
187
if options. roundtrip {
188
- buffer = operands . clone ( ) ;
188
+ buffer. clone_from ( operands ) ;
189
189
}
190
190
191
191
let mut n = if options. inverse {
Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ impl Ntv2Grid {
86
86
continue ;
87
87
}
88
88
89
- current_grid_id = grid_id . clone ( ) ;
89
+ current_grid_id. clone_from ( & grid_id ) ;
90
90
91
91
if let Some ( children) = self . lookup_table . get ( & current_grid_id) {
92
- queue = children . clone ( ) ;
92
+ queue. clone_from ( children ) ;
93
93
} else {
94
94
// If we get here it means the current_parent_id has no children and we've found the grid
95
95
break ;
@@ -207,7 +207,7 @@ mod tests {
207
207
. contains( & "5458" . to_string( ) ) ) ;
208
208
209
209
// Grids with no children do not appear in the lookup table
210
- assert ! ( ntv2_grid. lookup_table. get ( "5556" ) . is_none ( ) ) ;
210
+ assert ! ( ! ntv2_grid. lookup_table. contains_key ( "5556" ) ) ;
211
211
212
212
Ok ( ( ) )
213
213
}
Original file line number Diff line number Diff line change @@ -535,12 +535,12 @@ mod tests {
535
535
536
536
// Booleans correctly parsed?
537
537
assert ! (
538
- p. boolean. get ( "flag" ) . is_some ( ) ,
538
+ p. boolean. contains ( "flag" ) ,
539
539
"`flag` not in registered booleans: {:#?}" ,
540
540
p. boolean
541
541
) ;
542
542
assert ! (
543
- p. boolean. get ( "galf" ) . is_none ( ) ,
543
+ ! p. boolean. contains ( "galf" ) ,
544
544
"`galf` not in registered booleans: {:?}" ,
545
545
p. boolean
546
546
) ;
You can’t perform that action at this time.
0 commit comments