Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/changelog/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ fn record_unknown_range(out: &mut Vec<section::Segment>, range: Option<Range<usi
}

fn track_unknown_event(unknown_event: Event<'_>, unknown: &mut String) {
log::trace!("Cannot handle {:?}", unknown_event);
log::trace!("Cannot handle {unknown_event:?}");
match unknown_event {
Event::Html(text)
| Event::Code(text)
Expand Down
2 changes: 1 addition & 1 deletion src/command/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn changelog(opts: Options, crates: Vec<String>) -> anyhow::Result<()> {
change.commit()?;
}
if num_changes != 0 {
log::info!("Wrote {} changelogs", num_changes);
log::info!("Wrote {num_changes} changelogs");
}

Ok(())
Expand Down
4 changes: 1 addition & 3 deletions src/command/release/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ pub(in crate::command::release_impl) fn publish_crate(
bail!("Could not successfully execute 'cargo publish'.")
} else {
log::warn!(
"'cargo publish' run {} failed but we retry up to {} times to rule out flakiness",
attempt,
max_attempts
"'cargo publish' run {attempt} failed but we retry up to {max_attempts} times to rule out flakiness"
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/command/release/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub(in crate::command::release_impl) fn create_version_tag<'repo>(
);
}
None => {
log::trace!("WOULD create tag {}", tag_name);
log::trace!("WOULD create tag {tag_name}");
}
}
Ok(Some(format!("refs/tags/{tag_name}").try_into()?))
Expand Down
3 changes: 1 addition & 2 deletions src/command/release/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ pub fn create_release(
cmd.arg(notes);
if !dry_run && !cmd.status()?.success() {
log::warn!(
"'gh' tool execution failed - considering this non-critical, and you may try to create the release with: {:?}",
cmd
"'gh' tool execution failed - considering this non-critical, and you may try to create the release with: {cmd:?}"
);
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/command/release/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ fn commit_locks_and_generate_bail_message(
);
if !allow_fully_generated_changelogs {
for crate_name in crate_names {
log::warn!("{} {}", fix_preamble, crate_name);
log::warn!("{fix_preamble} {crate_name}");
}
}
}
Expand Down
18 changes: 11 additions & 7 deletions src/command/release/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ fn present_and_validate_dependencies(
causes.iter().map(|n| format!("'{n}'")).collect::<Vec<_>>().join(", ")
))
.unwrap_or_default(),
(bump.next_release != bump.desired_release)
.then(|| format!(", ignoring computed version {}", bump.desired_release))
.unwrap_or_default(),
if bump.next_release == bump.desired_release {
"".into()
} else {
format!(", ignoring computed version {}", bump.desired_release)
},
);
} else if bump.desired_release != dep.package.version {
log::info!(
Expand Down Expand Up @@ -358,9 +360,11 @@ fn present_and_validate_dependencies(
.map(|d| d.package.name.as_str())
.collect::<Vec<_>>();
if !crate_names_for_manifest_updates.is_empty() {
let plural_s = (crate_names_for_manifest_updates.len() > 1)
.then_some("s")
.unwrap_or_default();
let plural_s = if crate_names_for_manifest_updates.len() > 1 {
"s"
} else {
Default::default()
};
log::info!(
"{} adjust version constraints in manifest{} of {} package{} as direct dependencies are changing: {}",
will(dry_run),
Expand Down Expand Up @@ -502,7 +506,7 @@ fn wait_for_release(
}

std::thread::sleep(sleep_time);
log::info!("attempt {}", attempt);
log::info!("attempt {attempt}");
}
Ok(())
}
Expand Down
5 changes: 1 addition & 4 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ fn fill_in_root_crate_if_needed(crate_names: Vec<String>) -> anyhow::Result<Vec<
} else {
dir_name.to_owned()
};
log::warn!(
"Using '{}' as crate name as no one was provided. Specify one if this isn't correct",
crate_name
);
log::warn!("Using '{crate_name}' as crate name as no one was provided. Specify one if this isn't correct");
vec![crate_name]
} else {
crate_names
Expand Down
2 changes: 1 addition & 1 deletion src/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn change_since_last_release(package: &Package, ctx: &crate::Context) -> any
.peel_to_kind(object::Kind::Tree)?
.into_tree()
.peel_to_entry(components.clone())?
.unwrap_or_else(|| panic!("path '{}' must exist in current_commit `{}`", dir, current_commit))
.unwrap_or_else(|| panic!("path '{dir}' must exist in current_commit `{current_commit}`"))
.object_id();
if let Some(released_dir_entry) = released_target
.object()?
Expand Down
Loading