Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump hashbrown from 0.15.0 to 0.15.2 #267

Merged
merged 2 commits into from
Dec 5, 2024
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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/buildpacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ pub(crate) enum CalculateDigestError {
ExitStatus(String, ExitStatus),
}

pub(crate) fn calculate_digest(digest_url: &String) -> Result<String, CalculateDigestError> {
pub(crate) fn calculate_digest(digest_url: &str) -> Result<String, CalculateDigestError> {
let output = Command::new("crane")
.args(["digest", digest_url])
.output()
.map_err(|e| CalculateDigestError::CommandFailure(digest_url.clone(), e))?;
.map_err(|e| CalculateDigestError::CommandFailure(digest_url.to_owned(), e))?;

if output.status.success() {
Ok(String::from_utf8_lossy(&output.stdout).trim().to_string())
} else {
Err(CalculateDigestError::ExitStatus(
digest_url.clone(),
digest_url.to_owned(),
output.status,
))
}
Expand Down
12 changes: 6 additions & 6 deletions src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ pub(crate) enum ChangelogError {
pub(crate) fn generate_release_declarations<S: Into<String>>(
changelog: &Changelog,
repository: S,
starting_with_version: &Option<Version>,
starting_with_version: Option<&Version>,
) -> String {
let repository = repository.into();

let mut versions = changelog.releases.values().filter_map(|release| {
if let Some(starting_version) = &starting_with_version {
if starting_version.le(&release.version) {
if (*starting_version).le(&release.version) {
Some(&release.version)
} else {
None
Expand Down Expand Up @@ -394,7 +394,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
let declarations = generate_release_declarations(
&changelog,
"https://github.com/olivierlacan/keep-a-changelog",
&None,
None,
);
assert_eq!(
declarations,
Expand Down Expand Up @@ -422,7 +422,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
let declarations = generate_release_declarations(
&changelog,
"https://github.com/olivierlacan/keep-a-changelog",
&None,
None,
);
assert_eq!(
declarations,
Expand All @@ -438,7 +438,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
let declarations = generate_release_declarations(
&changelog,
"https://github.com/olivierlacan/keep-a-changelog",
&None,
None,
);
assert_eq!(
declarations,
Expand All @@ -452,7 +452,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
let declarations = generate_release_declarations(
&changelog,
"https://github.com/olivierlacan/keep-a-changelog",
&Some(Version {
Some(&Version {
major: 1,
minor: 0,
patch: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/prepare_release/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub(crate) fn execute(args: PrepareReleaseArgs) -> Result<()> {
let release_declarations = generate_release_declarations(
&new_changelog,
repository_url.to_string(),
&declarations_starting_version,
declarations_starting_version.as_ref(),
);

let changelog_contents = format!("{new_changelog}\n{release_declarations}\n");
Expand Down