@@ -8,7 +8,7 @@ use std::{
8
8
9
9
use anyhow:: { anyhow, bail} ;
10
10
use git_repository as git;
11
- use git_repository:: bstr:: { BStr , BString } ;
11
+ use git_repository:: bstr:: BStr ;
12
12
use git_repository:: { actor, bstr:: ByteSlice , interrupt, objs, prelude:: * , progress, Progress } ;
13
13
use itertools:: Itertools ;
14
14
@@ -65,21 +65,21 @@ where
65
65
for commit_data in rx {
66
66
if let Some ( author) = objs:: CommitRefIter :: from_bytes ( & commit_data)
67
67
. author ( )
68
- . map ( |author| mailmap. resolve ( author. trim ( ) ) )
68
+ . map ( |author| mailmap. resolve_cow ( author. trim ( ) ) )
69
69
. ok ( )
70
70
{
71
- let mut string_ref = |s : & BString | -> & ' static BStr {
72
- match string_heap. get ( s. as_slice ( ) ) {
71
+ let mut string_ref = |s : & [ u8 ] | -> & ' static BStr {
72
+ match string_heap. get ( s) {
73
73
Some ( n) => n. as_bstr ( ) ,
74
74
None => {
75
- let sv: Vec < u8 > = s. clone ( ) . into ( ) ;
75
+ let sv: Vec < u8 > = s. to_owned ( ) . into ( ) ;
76
76
string_heap. insert ( Box :: leak ( sv. into_boxed_slice ( ) ) ) ;
77
- ( * string_heap. get ( s. as_slice ( ) ) . expect ( "present" ) ) . as_ref ( )
77
+ ( * string_heap. get ( s) . expect ( "present" ) ) . as_ref ( )
78
78
}
79
79
}
80
80
} ;
81
- let name = string_ref ( & author. name ) ;
82
- let email = string_ref ( & author. email ) ;
81
+ let name = string_ref ( author. name . as_ref ( ) ) ;
82
+ let email = string_ref ( & author. email . as_ref ( ) ) ;
83
83
84
84
out. push ( actor:: SignatureRef {
85
85
name,
0 commit comments