1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-29 02:12:05 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
Martin Geisler
aaca44f62b
Format files with dprint (#711)
The dprint formatter is a flexible system which will use sandboxed
WebAssembly formatters to format our code (mostly: it calls out to
`rustfmt` for Rust code).

A particularly interesting feature is that dprint can format Rust code
blocks in the Markdown files. However, before we turn that on, we need
to have a way to normalize the Markdown text as it is extracted[1].
That is so that the word put into the translations is kept after the
reformatting.

[1]: https://github.com/google/mdbook-i18n-helpers/issues/19
2023-05-30 17:04:19 +02:00
Martin Geisler
b4fb870af6
Enable imports_granularity for rustfmt (#637)
This requires us to run a nightly Rust for our formatting check[1]. Other
users will see a warning when invoking `rustfmt`:

  Warning: can't set `imports_granularity = Module`, unstable features
  are only available in nightly channel.

This should be harmless overall and help us ensure better consistency
in our import formatting.

[1]: https://rust-lang.github.io/rustfmt/?version=v1.5.1&search=#imports_granularity
2023-05-16 12:35:49 +02:00
Andrew Walbran
6cba1ef2bb rustfmt with imports_granularity = "module". 2023-04-05 16:28:07 +01:00
Martin Geisler
c212a473ba Publish Comprehensive Rust 🦀 2022-12-21 16:38:28 +01:00