Skip to content

Apply the Rust 2024 formatting style and check it in CI #5

Open

Description

@francescobianco

Description

The crate is on edition 2024, but the code still follows the old formatting style. Running cargo fmt --check today reports differences in 43 files. Most of them come from the 2024 style edition's new sort order for imports, for example:

-use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION, CONTENT_TYPE};
+use reqwest::header::{AUTHORIZATION, CONTENT_TYPE, HeaderMap, HeaderValue};

Proposal

  • Run cargo fmt once and commit the result as a single, formatting-only commit, so the diff is easy to review.
  • Add a cargo fmt --all -- --check step to .github/workflows/rust.yml so formatting can't drift again.

Benefits

  • ✅ Code consistent with the 2024 style edition
  • ✅ Smaller diffs in future PRs, with no formatting noise
  • ✅ Contributors get immediate CI feedback

Acceptance criteria

  • cargo fmt --all -- --check passes locally
  • CI runs the format check on push and PR
  • No functional changes in the PR

Context

This is part of bringing openapi-cli up to the same baseline the Openapi® Rust SDK just reached with its move to the Rust 2024 edition (openapi-rust-sdk#14, announced in discussions#86). The CLI already uses edition = "2024"; these issues make it hold up in practice.

New here?

This is a small, self-contained task: a great first contribution to an Openapi® project. Comment below to claim it, then fork, branch and open a PR referencing this issue. Questions are welcome in the thread. Once merged, you are welcome to add yourself to the official Openapi® contributors registry. 🦀

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions