@@ -154,11 +154,11 @@ impl Snapshot {
154
154
155
155
pub fn new < ' a > ( entries : impl IntoIterator < Item = crate :: Entry < ' a > > ) -> Self {
156
156
let mut snapshot = Self :: default ( ) ;
157
- snapshot. extend ( entries) ;
157
+ snapshot. merge ( entries) ;
158
158
snapshot
159
159
}
160
160
161
- pub fn extend < ' a > ( & mut self , entries : impl IntoIterator < Item = crate :: Entry < ' a > > ) -> & mut Self {
161
+ pub fn merge < ' a > ( & mut self , entries : impl IntoIterator < Item = crate :: Entry < ' a > > ) -> & mut Self {
162
162
for entry in entries {
163
163
let old_email: EncodedStringRef < ' _ > = entry. old_email . into ( ) ;
164
164
assert ! (
@@ -207,7 +207,7 @@ fn enriched_signature(
207
207
new_email : Option < & BString > ,
208
208
new_name : Option < & BString > ,
209
209
) -> Option < Signature > {
210
- let time = time. clone ( ) ;
210
+ let time = * time;
211
211
match ( new_email, new_name) {
212
212
( Some ( new_email) , Some ( new_name) ) => git_actor:: Signature {
213
213
email : new_email. to_owned ( ) ,
@@ -239,15 +239,15 @@ mod encoded_string {
239
239
#[ test]
240
240
fn basic_ascii_case_folding ( ) {
241
241
assert_eq ! (
242
- EncodedString :: Utf8 ( "FooBar" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "foobar" . into ( ) ) ) ,
242
+ EncodedString :: Utf8 ( "FooBar" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "foobar" ) ) ,
243
243
Ordering :: Equal
244
244
) ;
245
245
}
246
246
247
247
#[ test]
248
248
fn no_advanced_unicode_folding ( ) {
249
249
assert_ne ! (
250
- EncodedString :: Utf8 ( "Masse" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "Maße" . into ( ) ) ) ,
250
+ EncodedString :: Utf8 ( "Masse" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "Maße" ) ) ,
251
251
Ordering :: Equal
252
252
) ;
253
253
}
@@ -259,7 +259,7 @@ mod encoded_string {
259
259
Ordering :: Equal
260
260
) ;
261
261
assert_ne ! (
262
- EncodedString :: Unknown ( "Foo" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "foo" . into ( ) ) ) ,
262
+ EncodedString :: Unknown ( "Foo" . into( ) ) . cmp_ref( EncodedStringRef :: Utf8 ( "foo" ) ) ,
263
263
Ordering :: Equal
264
264
) ;
265
265
assert_ne ! (
0 commit comments