@@ -162,7 +162,7 @@ pub fn build_info(cli_options: &CliOptions) -> Result<Info> {
162162 } ;
163163 let dominant_language = langs:: get_main_language ( & loc_by_language) ;
164164 let ascii_colors = get_ascii_colors (
165- & cli_options. ascii . ascii_language ,
165+ cli_options. ascii . ascii_language . as_ref ( ) ,
166166 & dominant_language,
167167 & cli_options. ascii . ascii_colors ,
168168 true_color,
@@ -180,19 +180,19 @@ pub fn build_info(cli_options: &CliOptions) -> Result<Info> {
180180
181181 Ok ( InfoBuilder :: new ( cli_options)
182182 . title ( & repo, no_bold, & text_colors)
183- . project ( & repo, & repo_url, & manifest, number_separator) ?
184- . description ( & manifest)
183+ . project ( & repo, & repo_url, manifest. as_ref ( ) , number_separator) ?
184+ . description ( manifest. as_ref ( ) )
185185 . head ( & repo) ?
186186 . pending ( & repo) ?
187- . version ( & repo, & manifest) ?
187+ . version ( & repo, manifest. as_ref ( ) ) ?
188188 . created ( & git_metrics, iso_time)
189189 . languages (
190190 & loc_by_language,
191191 true_color,
192192 number_of_languages_to_display,
193193 & text_colors,
194194 )
195- . dependencies ( & manifest, number_separator)
195+ . dependencies ( manifest. as_ref ( ) , number_separator)
196196 . authors (
197197 & git_metrics,
198198 number_of_authors_to_display,
@@ -211,7 +211,7 @@ pub fn build_info(cli_options: &CliOptions) -> Result<Info> {
211211 ) ?
212212 . loc ( & loc_by_language, number_separator)
213213 . size ( & repo, number_separator)
214- . license ( & repo_path, & manifest) ?
214+ . license ( & repo_path, manifest. as_ref ( ) ) ?
215215 . build ( cli_options, text_colors, dominant_language, ascii_colors) )
216216}
217217
@@ -239,9 +239,9 @@ impl InfoBuilder {
239239 self
240240 }
241241
242- fn description ( mut self , manifest : & Option < Manifest > ) -> Self {
242+ fn description ( mut self , manifest : Option < & Manifest > ) -> Self {
243243 if !self . disabled_fields . contains ( & InfoType :: Description ) {
244- let description = DescriptionInfo :: new ( manifest. as_ref ( ) ) ;
244+ let description = DescriptionInfo :: new ( manifest) ;
245245 self . info_fields . push ( Box :: new ( description) ) ;
246246 }
247247 self
@@ -267,11 +267,11 @@ impl InfoBuilder {
267267 mut self ,
268268 repo : & Repository ,
269269 repo_url : & str ,
270- manifest : & Option < Manifest > ,
270+ manifest : Option < & Manifest > ,
271271 number_separator : NumberSeparator ,
272272 ) -> Result < Self > {
273273 if !self . disabled_fields . contains ( & InfoType :: Project ) {
274- let project = ProjectInfo :: new ( repo, repo_url, manifest. as_ref ( ) , number_separator) ?;
274+ let project = ProjectInfo :: new ( repo, repo_url, manifest, number_separator) ?;
275275 self . info_fields . push ( Box :: new ( project) ) ;
276276 }
277277 Ok ( self )
@@ -285,9 +285,9 @@ impl InfoBuilder {
285285 Ok ( self )
286286 }
287287
288- fn version ( mut self , repo : & Repository , manifest : & Option < Manifest > ) -> Result < Self > {
288+ fn version ( mut self , repo : & Repository , manifest : Option < & Manifest > ) -> Result < Self > {
289289 if !self . disabled_fields . contains ( & InfoType :: Version ) {
290- let version = VersionInfo :: new ( repo, manifest. as_ref ( ) ) ?;
290+ let version = VersionInfo :: new ( repo, manifest) ?;
291291 self . info_fields . push ( Box :: new ( version) ) ;
292292 }
293293 Ok ( self )
@@ -301,9 +301,9 @@ impl InfoBuilder {
301301 self
302302 }
303303
304- fn license ( mut self , repo_path : & Path , manifest : & Option < Manifest > ) -> Result < Self > {
304+ fn license ( mut self , repo_path : & Path , manifest : Option < & Manifest > ) -> Result < Self > {
305305 if !self . disabled_fields . contains ( & InfoType :: License ) {
306- let license = LicenseInfo :: new ( repo_path, manifest. as_ref ( ) ) ?;
306+ let license = LicenseInfo :: new ( repo_path, manifest) ?;
307307 self . info_fields . push ( Box :: new ( license) ) ;
308308 }
309309 Ok ( self )
@@ -338,11 +338,11 @@ impl InfoBuilder {
338338
339339 fn dependencies (
340340 mut self ,
341- manifest : & Option < Manifest > ,
341+ manifest : Option < & Manifest > ,
342342 number_separator : NumberSeparator ,
343343 ) -> Self {
344344 if !self . disabled_fields . contains ( & InfoType :: Dependencies ) {
345- let dependencies = DependenciesInfo :: new ( manifest. as_ref ( ) , number_separator) ;
345+ let dependencies = DependenciesInfo :: new ( manifest, number_separator) ;
346346 self . info_fields . push ( Box :: new ( dependencies) ) ;
347347 }
348348 self
0 commit comments