Fix `cargo fmt --check` failure that turns Contract CI red on main

オープン 初心者向け
#53 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, rust
領域
ci-cd, tooling

調査の方向性

変更が必要なファイルは contracts/invoice/src/lib.rs のみです。contracts/ で cargo fmt --all を実行し、差分を確認してください。差分は get_invoice_range のシグネチャ、空行、折り返された if let Some(inv) の式だけに限られるはずです。cargo fmt --all --check が成功し、cargo clippy --all-targets と cargo test が 23 個のテストすべてで引き続き成功し、差分にロジックの変更がなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

bug contract difficulty: beginner dx good first issue help wanted

Difficulty: Beginner

Problem

After PR #42 was merged, cargo fmt --all --check fails on main. rustfmt wants the get_invoice_range signature on one line, wants two whitespace-only lines inside it emptied, and wants the long if let Some(inv) = env.storage()... expression wrapped. Contract CI fails at its first step (format check), so clippy, tests and the wasm build never run.

Why it matters

A red Contract CI hides real regressions and blocks every future contract PR from showing a meaningful status.

Scope of work

Run cargo fmt --all in contracts/ and commit the result. No behaviour change. Only contracts/invoice/src/lib.rs should change (about 15 lines).

Acceptance criteria

  • cargo fmt --all --check passes.
  • cargo clippy --all-targets and cargo test still pass (23 tests).
  • Contract CI is green on the PR.
  • The diff contains formatting changes only.

Relevant files

  • contracts/invoice/src/lib.rs

Dependencies

None.

Maintainer discussion needed?

No. Urgent, because CI is currently red.

主要言語
TypeScript
スター
0
フォーク
4
平均マージ
54分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Yormee-103/PayLoop のほかの issue

Yormee-103/PayLoop の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。