Skip to content

Commit d1b13c2

Browse files
committed
Actually use skip_optional_value() and skip_string_list().
1 parent 632378e commit d1b13c2

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

cargo-dist/src/init/apply_dist/artifacts.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ pub fn apply(table: &mut toml_edit::Table, artifacts: &Option<ArtifactLayer>) {
2323
artifacts.source_tarball,
2424
);
2525

26-
// FIXME(migration): Like with the v0 config, [dist.artifacts.extra] is
27-
// not currently reformatted due to compelxity.
28-
/*
29-
apply_optional_value(
26+
// [dist.artifacts.extra] is not reformatted due to complexity.
27+
skip_optional_value(
3028
artifacts_table,
3129
"extra",
3230
"# Any extra artifacts, and their build scripts\n",
33-
artifacts.extra,
31+
artifacts.extra.as_ref(),
3432
);
35-
*/
3633

3734
apply_optional_value(
3835
artifacts_table,

cargo-dist/src/init/apply_dist/ci.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,21 @@ fn apply_ci_github(ci_table: &mut toml_edit::Table, github: &GithubCiLayer) {
4848

4949
apply_ci_common(gh_table, &github.common);
5050

51-
// FIXME(migration): Like with the v0 config, [dist.github.runners] and
52-
// [dist.github.permissions] are not currently reformatted due to complexity.
53-
/*
54-
apply_optional_value(
51+
// [dist.ci.github.runners] is not reformatted due to complexity.
52+
skip_optional_value(
5553
gh_table,
5654
"runners",
5755
"# Custom GitHub runners, specified as target triples\n",
58-
github.runners,
56+
github.runners.as_ref(),
5957
);
6058

61-
apply_optional_value(
59+
// [dist.ci.github.permissions] is not reformatted due to complexity.
60+
skip_optional_value(
6261
gh_table,
6362
"permissions",
6463
"# Custom permissions for jobs\n",
65-
github.permissions,
64+
github.permissions.as_ref(),
6665
);
67-
*/
6866

6967
apply_optional_value(
7068
gh_table,

cargo-dist/src/init/apply_dist/installers.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,13 @@ fn apply_installers_common(table: &mut toml_edit::Table, common: &CommonInstalle
160160
common.install_libraries.as_ref(),
161161
);
162162

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

167172
fn apply_installers_homebrew(

0 commit comments

Comments
 (0)