@@ -46,15 +46,15 @@ mod merge {
46
46
) ;
47
47
48
48
let mut buf = Vec :: new ( ) ;
49
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
49
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
50
50
assert_eq ! (
51
51
res,
52
52
( Pick :: Ours , Resolution :: Conflict ) ,
53
53
"it detected the binary buffer, ran the binary merge with default conflict resolution"
54
54
) ;
55
55
56
56
platform_ref. options . resolve_binary_with = Some ( builtin_driver:: binary:: ResolveWith :: Theirs ) ;
57
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
57
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
58
58
assert_eq ! (
59
59
res,
60
60
( Pick :: Theirs , Resolution :: Complete ) ,
@@ -86,7 +86,7 @@ mod merge {
86
86
let mut platform_ref = platform. prepare_merge ( & db, Default :: default ( ) ) ?;
87
87
assert_eq ! ( platform_ref. driver, DriverChoice :: BuiltIn ( BuiltinDriver :: Text ) ) ;
88
88
let mut buf = Vec :: new ( ) ;
89
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
89
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
90
90
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Conflict ) ) ;
91
91
assert_eq ! (
92
92
buf. as_bstr( ) ,
@@ -102,7 +102,7 @@ theirs
102
102
style : ConflictStyle :: Diff3 ,
103
103
marker_size : 3 ,
104
104
} ;
105
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
105
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
106
106
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Conflict ) ) ;
107
107
108
108
assert_eq ! (
@@ -119,7 +119,7 @@ theirs
119
119
) ;
120
120
121
121
platform_ref. options . text . conflict = builtin_driver:: text:: Conflict :: ResolveWithOurs ;
122
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
122
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
123
123
assert_eq ! (
124
124
res,
125
125
( Pick :: Buffer , Resolution :: Complete ) ,
@@ -128,23 +128,23 @@ theirs
128
128
assert_eq ! ( buf. as_bstr( ) , "ours" ) ;
129
129
130
130
platform_ref. options . text . conflict = builtin_driver:: text:: Conflict :: ResolveWithTheirs ;
131
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
131
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
132
132
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Complete ) ) ;
133
133
assert_eq ! ( buf. as_bstr( ) , "theirs" ) ;
134
134
135
135
platform_ref. options . text . conflict = builtin_driver:: text:: Conflict :: ResolveWithUnion ;
136
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
136
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
137
137
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Complete ) ) ;
138
138
assert_eq ! ( buf. as_bstr( ) , "ours\n theirs" ) ;
139
139
140
140
platform_ref. driver = DriverChoice :: BuiltIn ( BuiltinDriver :: Union ) ;
141
141
platform_ref. options . text . conflict = builtin_driver:: text:: Conflict :: default ( ) ;
142
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
142
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
143
143
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Complete ) ) ;
144
144
assert_eq ! ( buf. as_bstr( ) , "ours\n theirs" ) ;
145
145
146
146
platform_ref. driver = DriverChoice :: BuiltIn ( BuiltinDriver :: Binary ) ;
147
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
147
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
148
148
assert_eq ! (
149
149
res,
150
150
( Pick :: Ours , Resolution :: Conflict ) ,
@@ -163,7 +163,7 @@ theirs
163
163
( "b\n " , Pick :: Ancestor , builtin_driver:: binary:: ResolveWith :: Ancestor ) ,
164
164
] {
165
165
platform_ref. options . resolve_binary_with = Some ( resolve) ;
166
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
166
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
167
167
assert_eq ! ( res, ( expected_pick, Resolution :: Complete ) ) ;
168
168
assert_eq ! ( platform_ref. buffer_by_pick( res. 0 ) . unwrap( ) . as_bstr( ) , expected) ;
169
169
}
@@ -202,7 +202,7 @@ theirs
202
202
203
203
let platform_ref = platform. prepare_merge ( & db, Default :: default ( ) ) ?;
204
204
let mut buf = Vec :: new ( ) ;
205
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
205
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
206
206
assert_eq ! ( res, ( Pick :: Buffer , Resolution :: Complete ) , "merge drivers always merge " ) ;
207
207
let mut lines = cleaned_driver_lines ( & buf) ?;
208
208
for tmp_file in lines. by_ref ( ) . take ( 3 ) {
@@ -228,7 +228,7 @@ theirs
228
228
let id = db. insert ( "binary\0 " ) ;
229
229
platform. set_resource ( id, EntryKind :: Blob , "b" . into ( ) , ResourceKind :: OtherOrTheirs , & db) ?;
230
230
let platform_ref = platform. prepare_merge ( & db, Default :: default ( ) ) ?;
231
- let res = platform_ref. merge ( & mut buf, default_labels ( ) , Default :: default ( ) ) ?;
231
+ let res = platform_ref. merge ( & mut buf, default_labels ( ) , & Default :: default ( ) ) ?;
232
232
assert_eq ! (
233
233
res,
234
234
( Pick :: Buffer , Resolution :: Complete ) ,
@@ -282,7 +282,7 @@ theirs
282
282
let platform_ref = platform. prepare_merge ( & gix_object:: find:: Never , Default :: default ( ) ) ?;
283
283
284
284
let mut buf = Vec :: new ( ) ;
285
- let res = platform_ref. merge ( & mut buf, Default :: default ( ) , Default :: default ( ) ) ?;
285
+ let res = platform_ref. merge ( & mut buf, Default :: default ( ) , & Default :: default ( ) ) ?;
286
286
assert_eq ! (
287
287
res,
288
288
( Pick :: Buffer , Resolution :: Complete ) ,
@@ -359,7 +359,7 @@ theirs
359
359
360
360
let mut out = Vec :: new ( ) ;
361
361
let err = platform_ref
362
- . merge ( & mut out, Default :: default ( ) , Default :: default ( ) )
362
+ . merge ( & mut out, Default :: default ( ) , & Default :: default ( ) )
363
363
. unwrap_err ( ) ;
364
364
assert ! ( matches!( err, platform:: merge:: Error :: ResourceTooLarge ) ) ;
365
365
0 commit comments