File tree 2 files changed +9
-8
lines changed 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl Info {
184
184
}
185
185
} ) ;
186
186
187
- let repo = Repo :: new ( & repo) ?;
187
+ let repo = Repo :: new ( repo) ?;
188
188
let mut commits = Commits :: new (
189
189
repo. gitoxide ( ) ,
190
190
config. no_merges ,
@@ -197,13 +197,14 @@ impl Info {
197
197
let git_username = repo. get_git_username ( ) ?;
198
198
let number_of_tags = repo. get_number_of_tags ( ) ?;
199
199
let number_of_branches = repo. get_number_of_branches ( ) ?;
200
+ let ( repo_size, file_count) = repo. get_repo_size ( ) ;
201
+ let license = Detector :: new ( ) ?. get_license ( & workdir) ?;
202
+ let dependencies = DependencyDetector :: new ( ) . get_dependencies ( & workdir) ?;
203
+
200
204
let creation_date = commits. get_creation_date ( config. iso_time ) ;
201
205
let number_of_commits = commits. count ( ) ;
202
206
let ( authors, contributors) = commits. take_authors ( config. show_email ) ;
203
207
let last_change = commits. get_date_of_last_commit ( config. iso_time ) ;
204
- let ( repo_size, file_count) = repo. get_repo_size ( ) ;
205
- let license = Detector :: new ( ) ?. get_license ( & workdir) ?;
206
- let dependencies = DependencyDetector :: new ( ) . get_dependencies ( & workdir) ?;
207
208
208
209
let pending_changes = pending_changes
209
210
. join ( )
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ pub struct Commits {
23
23
time_of_first_commit : git:: actor:: Time ,
24
24
}
25
25
26
- pub struct Repo < ' a > {
27
- git2_repo : & ' a Repository ,
26
+ pub struct Repo {
27
+ git2_repo : Repository ,
28
28
repo : git:: Repository ,
29
29
}
30
30
@@ -153,8 +153,8 @@ impl Commits {
153
153
}
154
154
}
155
155
156
- impl < ' a > Repo < ' a > {
157
- pub fn new ( git2_repo : & ' a Repository ) -> Result < Self > {
156
+ impl Repo {
157
+ pub fn new ( git2_repo : Repository ) -> Result < Self > {
158
158
let repo = git:: open ( git2_repo. path ( ) ) ?;
159
159
160
160
Ok ( Self { repo, git2_repo } )
You can’t perform that action at this time.
0 commit comments