Skip to content

Commit

Permalink
Actually use skip_optional_value() and skip_string_list().
Browse files Browse the repository at this point in the history
  • Loading branch information
duckinator committed Feb 10, 2025
1 parent 632378e commit d1b13c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
9 changes: 3 additions & 6 deletions cargo-dist/src/init/apply_dist/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ pub fn apply(table: &mut toml_edit::Table, artifacts: &Option<ArtifactLayer>) {
artifacts.source_tarball,
);

// FIXME(migration): Like with the v0 config, [dist.artifacts.extra] is
// not currently reformatted due to compelxity.
/*
apply_optional_value(
// [dist.artifacts.extra] is not reformatted due to complexity.
skip_optional_value(
artifacts_table,
"extra",
"# Any extra artifacts, and their build scripts\n",
artifacts.extra,
artifacts.extra.as_ref(),
);
*/

apply_optional_value(
artifacts_table,
Expand Down
14 changes: 6 additions & 8 deletions cargo-dist/src/init/apply_dist/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,21 @@ fn apply_ci_github(ci_table: &mut toml_edit::Table, github: &GithubCiLayer) {

apply_ci_common(gh_table, &github.common);

// FIXME(migration): Like with the v0 config, [dist.github.runners] and
// [dist.github.permissions] are not currently reformatted due to complexity.
/*
apply_optional_value(
// [dist.ci.github.runners] is not reformatted due to complexity.
skip_optional_value(
gh_table,
"runners",
"# Custom GitHub runners, specified as target triples\n",
github.runners,
github.runners.as_ref(),
);

apply_optional_value(
// [dist.ci.github.permissions] is not reformatted due to complexity.
skip_optional_value(
gh_table,
"permissions",
"# Custom permissions for jobs\n",
github.permissions,
github.permissions.as_ref(),
);
*/

apply_optional_value(
gh_table,
Expand Down
9 changes: 7 additions & 2 deletions cargo-dist/src/init/apply_dist/installers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,13 @@ fn apply_installers_common(table: &mut toml_edit::Table, common: &CommonInstalle
common.install_libraries.as_ref(),
);

// / Aliases to install binaries as
// TODO(migration): handle `pub bin_aliases: Option<SortedMap<String, Vec<String>>>`
// [dist.ci.installers.bin-aliases] is not reformatted due to complexity.
skip_string_list(
table,
"bin-aliases",
"# Aliases to install for generated binaries\n",
common.bin_aliases.as_ref(),
);
}

fn apply_installers_homebrew(

Check failure on line 172 in cargo-dist/src/init/apply_dist/installers.rs

View workflow job for this annotation

GitHub Actions / clippy

function `apply_installers_homebrew` is never used

error: function `apply_installers_homebrew` is never used --> cargo-dist/src/init/apply_dist/installers.rs:172:4 | 172 | fn apply_installers_homebrew( | ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit d1b13c2

Please sign in to comment.