Pin the Rust toolchain so rustfmt does not differ per checkout

Open Beginner friendly
#317 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
rust

Research direction

Start with .github/workflows/build.yml around line 177 and inspect the formatting discrepancy at lnvps_api_common/src/exchange.rs:621. Add rust-toolchain.toml with the requested channel, rustfmt, and clippy components, then reformat the tree and run cargo fmt --check to confirm it is clean under the pinned toolchain.

Written by the indexing model from the issue text.

Description

refactor

There is no rust-toolchain.toml in the repo, and CI installs dtolnay/rust-toolchain@stable (.github/workflows/build.yml:177), so every checkout formats with whatever stable it happens to have.

It already bites: cargo fmt --check flags lnvps_api_common/src/exchange.rs:621 on some checkouts and not others, on master (d72547f) as well as on branches, so the noise attaches itself to whichever diff is open at the time. Goran hit it reviewing #316; this checkout is clean at rustfmt 1.8.0-stable (rustc 1.94.1).

Add a rust-toolchain.toml pinning channel with the rustfmt and clippy components, then reformat once so the tree is clean under the pinned version.

Dominant language
Rust
Stars
9
Forks
2
Avg merge
21h 10m
Merged PRs (30d)
24

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LNVPS/api

All issues in LNVPS/api

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.