Skip to content

Commit 65969fa

Browse files
Upgrade to substance 0.7.1
1 parent 98b4a99 commit 65969fa

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

β€ŽCargo.lockβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žkitchensink/Cargo.lockβ€Ž

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žlimpid/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ path = "src/main.rs"
99

1010
[dependencies]
1111
anyhow = "1.0"
12+
substance = "0.7.1"
1213
# substance = { path = "../../substance" }
13-
substance = "0.6.0"
1414
# substance = { git = "https://github.com/fasterthanlime/substance.git", rev = "0f368db" }
1515
env_logger = "0.11"
1616
owo-colors = "4.0"

β€Žlimpid/src/main.rsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,13 @@ fn perform_comparison_analysis(
105105

106106
/// Build and analyze a manifest
107107
fn build_and_analyze(manifest_path: &Utf8Path) -> Result<BuildContext> {
108-
// Create build runner with unique target directory
109108
let runner = BuildRunner::for_manifest(manifest_path)
110109
.arg("--bin")
111110
.arg("ks-facet")
112111
.arg("--release");
113112

114113
println!("πŸ“¦ Building {}...", manifest_path.parent().unwrap());
115114

116-
// Run the build
117115
let context = runner
118116
.run()
119117
.map_err(|e| anyhow::anyhow!("Build failed: {:?}", e))?;

β€Žlimpid/src/report.rsβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub(crate) fn generate_reports(
145145
.collect();
146146

147147
// Sort by absolute byte difference (largest first)
148-
comparative_crates.sort_by_key(|c| cmp::Reverse(c.diff.abs() as u64));
148+
comparative_crates.sort_by_key(|c| cmp::Reverse(c.diff.unsigned_abs() as u64));
149149

150150
// Split into detailed (top 10) and excluded crates
151151
let detailed_crates: Vec<&ComparativeCrate> = comparative_crates.iter().take(10).collect();
@@ -293,7 +293,7 @@ pub(crate) fn generate_reports(
293293
.iter()
294294
.filter(|sym| sym.size_diff != 0) // ignore symbols with no change
295295
.collect();
296-
sorted_syms.sort_by_key(|sym| cmp::Reverse(sym.size_diff.abs() as u64));
296+
sorted_syms.sort_by_key(|sym| cmp::Reverse(sym.size_diff.unsigned_abs() as u64));
297297

298298
// Take at most the top N entries for the detailed list and partition the rest
299299
const TOP_N_SYMBOLS: usize = 20;
@@ -478,7 +478,7 @@ pub(crate) fn generate_reports(
478478
.collect();
479479

480480
// Sort by absolute line difference (largest first)
481-
comparative_fns.sort_by_key(|f| cmp::Reverse(f.line_diff.abs() as u64));
481+
comparative_fns.sort_by_key(|f| cmp::Reverse(f.line_diff.unsigned_abs() as u64));
482482

483483
// Split into detailed (top 20) and excluded
484484
let detailed_fns: Vec<&ComparativeFn> = comparative_fns.iter().take(20).collect();
@@ -535,7 +535,7 @@ pub(crate) fn generate_reports(
535535
if diff > 0 {
536536
format!("πŸ“ˆ +{}", fmt_thousands(diff))
537537
} else if diff < 0 {
538-
format!("πŸ“‰ -{}", fmt_thousands((-diff) as isize))
538+
format!("πŸ“‰ -{}", fmt_thousands(-diff))
539539
} else {
540540
"βž– no change".to_owned()
541541
}
@@ -573,7 +573,7 @@ pub(crate) fn generate_reports(
573573
let change_str = if diff > 0 {
574574
format!("πŸ“ˆ +{}", fmt_thousands(diff))
575575
} else if diff < 0 {
576-
format!("πŸ“‰ -{}", fmt_thousands((-diff) as isize))
576+
format!("πŸ“‰ -{}", fmt_thousands(-diff))
577577
} else {
578578
"βž– no change".to_string()
579579
};

0 commit comments

Comments
Β (0)