apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
574 stars 45 forks source link

Configure import grouping and granularity in rustfmt #873

Closed SimonSapin closed 4 months ago

SimonSapin commented 4 months ago

Per discussion in https://github.com/apollographql/apollo-rs/pull/868#discussion_r1651705217 except I picked group_imports = One as I slightly prefer it over StdExternalCrate. I don’t mind much which style we pick as long as we pick one.

SimonSapin commented 4 months ago

To avoid merge conflicts the easiest is likely:

  1. Merge https://github.com/apollographql/apollo-rs/pull/868 into main when it’s ready
  2. Revert the Run cargo +nightly fmt --all with the new config commit in this branch. (It’s included here to show what the result looks like)
  3. Merge main into this branch
  4. Run cargo +nightly fmt --all on the merge to make another version of that commit
  5. Push to update this PR