Skip to content

Commit 6a879b3

Browse files
committed
Apply feedback
1 parent ec738a9 commit 6a879b3

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

template/base/.github/actions/setup/action.yml.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ runs:
6161
if: {% raw %}${{ inputs.rustfmt == 'true' }}{% endraw %}
6262
uses: dtolnay/rust-toolchain@master
6363
with:
64-
toolchain: {% raw %}${{ env.RUSTFMT_NIGHTLY_VERSION }}{% endraw %}
64+
toolchain: {% raw %}${{ env.TOOLCHAIN_FORMAT }}{% endraw %}
6565
components: rustfmt
6666

6767
- name: Install Clippy
6868
if: {% raw %}${{ inputs.clippy == 'true' }}{% endraw %}
6969
uses: dtolnay/rust-toolchain@master
7070
with:
71-
toolchain: {% raw %}${{ env.CLIPPY_NIGHTLY_VERSION }}{% endraw %}
71+
toolchain: {% raw %}${{ env.TOOLCHAIN_LINT }}{% endraw %}
7272
components: clippy
7373

7474
- name: Install Solana

template/base/Cargo.toml.njk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
resolver = "2"
33
members = ["program"]
44

5-
[workspace.metadata.toolchain]
6-
lint = "{{ toolchain }}"
5+
# Specify Rust toolchains for rustfmt, clippy, and build.
6+
# Any unprovided toolchains default to stable.
7+
[workspace.metadata.toolchains]
78
format = "{{ toolchain }}"
9+
lint = "{{ toolchain }}"

template/base/scripts/ci/set-env.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env zx
22
import { getToolchain } from '../utils.mjs';
33

4-
await $`echo "RUSTFMT_NIGHTLY_VERSION=${getToolchain('format')}" >> $GITHUB_ENV`;
5-
await $`echo "CLIPPY_NIGHTLY_VERSION=${getToolchain('lint')}" >> $GITHUB_ENV`;
4+
await $`echo "TOOLCHAIN_FORMAT=${getToolchain('format')}" >> $GITHUB_ENV`;
5+
await $`echo "TOOLCHAIN_LINT=${getToolchain('lint')}" >> $GITHUB_ENV`;

template/base/scripts/utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function getCargoMetadata(folder) {
8585
}
8686

8787
export function getToolchain(operation) {
88-
return getCargoMetadata()?.toolchain?.[operation];
88+
return getCargoMetadata()?.toolchains?.[operation];
8989
}
9090

9191
export function getToolchainArgument(operation) {

0 commit comments

Comments
 (0)