@@ -4,12 +4,15 @@ use wasm_bindgen::prelude::wasm_bindgen;
44
55use crate :: {
66 common:: {
7- increment_named_data_points, to_percentage, CountMonthlyDataPoint , DownloadDataPoint , HallOfFameDataPoint , InactivityByReleaseDataPoint , IndividualDownloadDataPoint , OverviewDataPoint , RemovedByReleaseDataPoint
7+ CountMonthlyDataPoint , DownloadDataPoint , HallOfFameDataPoint ,
8+ InactivityByReleaseDataPoint , IndividualDownloadDataPoint , OverviewDataPoint ,
9+ RemovedByReleaseDataPoint , increment_named_data_points, to_percentage,
810 } ,
911 date:: Date ,
1012 license:: Licenses ,
1113 plugin:: {
12- full:: FullPluginData , LicenseInfo , NamedDataPoint , PluginData , PluginExtraData , PluginLicenseDataPoints , PluginRepoDataPoints
14+ LicenseInfo , NamedDataPoint , PluginData , PluginExtraData , PluginLicenseDataPoints ,
15+ PluginRepoDataPoints , full:: FullPluginData ,
1316 } ,
1417} ;
1518
@@ -512,13 +515,14 @@ impl PluginDataArrayView {
512515
513516 match & repo_data. file_license {
514517 LicenseInfo :: Known ( name) => {
515- let license_data = licenses
516- . licenses
517- . iter ( )
518- . find ( |l| * name == l. spdx_id ) ;
518+ let license_data = licenses. licenses . iter ( ) . find ( |l| * name == l. spdx_id ) ;
519519
520520 if let Some ( license_data) = license_data {
521- increment_named_data_points ( & mut points. licenses , & license_data. spdx_id , 1.0 ) ;
521+ increment_named_data_points (
522+ & mut points. licenses ,
523+ & license_data. spdx_id ,
524+ 1.0 ,
525+ ) ;
522526
523527 for permission in & license_data. permissions {
524528 increment_named_data_points ( & mut points. permissions , permission, 1.0 ) ;
@@ -531,11 +535,19 @@ impl PluginDataArrayView {
531535 }
532536 } else {
533537 // I think we should never hit this path, as we make sure that the license is known during data extraction.
534- increment_named_data_points ( & mut points. licenses , & LicenseInfo :: Unrecognized . to_fancy_string ( ) , 1.0 ) ;
538+ increment_named_data_points (
539+ & mut points. licenses ,
540+ & LicenseInfo :: Unrecognized . to_fancy_string ( ) ,
541+ 1.0 ,
542+ ) ;
535543 }
536544 }
537545 other => {
538- increment_named_data_points ( & mut points. licenses , & other. to_fancy_string ( ) , 1.0 ) ;
546+ increment_named_data_points (
547+ & mut points. licenses ,
548+ & other. to_fancy_string ( ) ,
549+ 1.0 ,
550+ ) ;
539551 }
540552 }
541553 } ) ;
0 commit comments