diff --git a/src/bump.rs b/src/bump.rs index f354ca6..5636b40 100644 --- a/src/bump.rs +++ b/src/bump.rs @@ -689,16 +689,14 @@ pub fn apply_release_plan( /// Print the release plan without making changes. pub fn print_plan(plan: &ReleasePlan) { - let max_name = plan.bumps.values().map(|b| b.package_name.len()).max().unwrap_or(20); println!("Bumped packages:"); for (_name, bump) in &plan.bumps { println!( - " {:12} → {:<12} ({})", + " {} {} → {} ({})", bump.package_name, - bump.old_version.to_string(), - bump.new_version.to_string(), - bump.bump_type_str(), - width = max_name + bump.old_version, + bump.new_version, + bump.bump_type_str() ); } diff --git a/src/main.rs b/src/main.rs index 5b9811d..b2455f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -249,19 +249,20 @@ fn cmd_status() -> Result<()> { } } + println!(); + // Show calculated bumps match build_release_plan(&workspace, &config, &release_dir, true) { Ok(plan) => { - let max_name = plan.bumps.values().map(|b| b.package_name.len()).max().unwrap_or(20); + let _max_name = plan.bumps.values().map(|b| b.package_name.len()).max().unwrap_or(20); println!("Calculated bumps:"); for (_name, bump) in &plan.bumps { println!( - " {:12} → {:<12} ({})", + " {} {} → {} ({})", bump.package_name, - bump.old_version.to_string(), - bump.new_version.to_string(), - bump.bump_type_str(), - width = max_name + bump.old_version, + bump.new_version, + bump.bump_type_str() ); } if !plan.internal_dep_updates.is_empty() { @@ -299,15 +300,13 @@ fn cmd_bump(dry_run: bool, archive: bool) -> Result<()> { } println!("Bumped packages:"); - let max_name = plan.bumps.values().map(|b| b.package_name.len()).max().unwrap_or(20); for (_name, bump) in &plan.bumps { println!( - " {:12} → {:<12} ({})", + " {} {} → {} ({})", bump.package_name, - bump.old_version.to_string(), - bump.new_version.to_string(), - bump.bump_type_str(), - width = max_name + bump.old_version, + bump.new_version, + bump.bump_type_str() ); } let plan_clone = plan.clone(); diff --git a/src/release_file.rs b/src/release_file.rs index 706e519..84c767f 100644 --- a/src/release_file.rs +++ b/src/release_file.rs @@ -342,7 +342,7 @@ pub fn archive_release_file(path: &Path, archive_dir: &Path) -> Result<()> { /// Used when a mixed release file contains entries for both pre-release /// and stable packages — the stable entries are removed so they don't /// repeat on the next bump, while pre-release entries are kept. -pub fn strip_stable_entries(path: &Path, is_pre_release: impl Fn(&str) -> bool) -> Result<()> { +pub fn strip_stable_entries(path: &Path, _is_pre_release: impl Fn(&str) -> bool) -> Result<()> { // The changelog already captured the content during Phase 3. // Any remaining entries would just cause re-processing on the next bump, // so consume the file regardless of which entries it contains.