Skip to content

Commit b919e2e

Browse files
committed
chore(core): run cargo fmt --all
1 parent 47030ce commit b919e2e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tooling/src/main.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ use std::fs;
33
use std::path::Path;
44

55
use clap::Parser;
6-
use report::{LinesOfCodeReport, LinesOfCodeReporterOptions, shell_summary, github_step_summary, pr_message, slack_message};
7-
use serde_json;
6+
use report::{
7+
LinesOfCodeReport, LinesOfCodeReporterOptions, github_step_summary, pr_message, shell_summary,
8+
slack_message,
9+
};
810
use spinoff::{Color, Spinner, spinners::Dots};
911
use tokei::{Config, LanguageType, Languages};
1012

@@ -23,7 +25,7 @@ fn count_lines_of_code() -> (usize, HashMap<String, usize>) {
2325
for report in &rust.reports {
2426
let file_path = report.name.to_string_lossy().to_string();
2527
if let Some(relative_path) = file_path.strip_prefix("../src/") {
26-
// Exclude files in ethrex/ subdirectory
28+
// Exclude files in ethrex/ subdirectory
2729
if !relative_path.starts_with("ethrex/") {
2830
total_loc += report.stats.code;
2931
detailed_files.insert(relative_path.to_string(), report.stats.code);
@@ -41,7 +43,7 @@ fn main() {
4143
let mut spinner = Spinner::new(Dots, "Counting lines of code...", Color::Cyan);
4244

4345
let (total_loc, detailed_files) = count_lines_of_code();
44-
46+
4547
spinner.success("Lines of code calculated!");
4648

4749
let mut spinner = Spinner::new(Dots, "Generating report...", Color::Cyan);
@@ -57,7 +59,7 @@ fn main() {
5759
serde_json::to_string(&detailed_files).unwrap(),
5860
)
5961
.expect("current_detailed_loc_report.json could not be written");
60-
62+
6163
spinner.success("Detailed report generated!");
6264
println!("{}", shell_summary(new_report));
6365
} else if opts.compare_detailed {
@@ -73,7 +75,7 @@ fn main() {
7375
pr_message(previous_detailed_loc_report, current_detailed_loc_report),
7476
)
7577
.unwrap();
76-
78+
7779
spinner.success("Comparison report generated!");
7880
} else if opts.summary {
7981
spinner.success("Report generated!");
@@ -104,4 +106,4 @@ fn main() {
104106
spinner.success("Report generated!");
105107
println!("{}", shell_summary(new_report));
106108
}
107-
}
109+
}

tooling/src/report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ pub fn shell_summary(new_report: LinesOfCodeReport) -> String {
187187
"ethrex_db:".bold(),
188188
new_report.ethrex_db,
189189
)
190-
}
190+
}

0 commit comments

Comments
 (0)