зеркало из https://github.com/mozilla/neqo.git
fix(.rustfmt.toml): specify Rust edition 2021 (#1722)
* fix(.rustfmt.toml): specify Rust edition 2021 Emacs' popular Rust plugin Rustic [1] uses `rustfmt` to format code. `rustfmt` only picks up the Rust edition from `Cargo.toml` when executed through `cargo fmt` [2] [3]. This commit duplicates the Rust edition in the `.rustfmt.toml` file. Thus all users of `rustfmt` (whether through `cargo fmt` or plain `rustfmt`) will get formatting according to their Rust edition, e.g. helpful when interacting with `async` code. [1]: https://github.com/brotzeit/rustic [2]: https://github.com/brotzeit/rustic?tab=readme-ov-file#edition-2018 [3]: https://github.com/rust-lang/rustfmt?tab=readme-ov-file#rusts-editions * Document keeping edition statements in sync
This commit is contained in:
Родитель
4a6ec6f597
Коммит
3476bd0545
|
@ -1,3 +1,10 @@
|
|||
# Keep in sync with `Cargo.toml` `edition`.
|
||||
#
|
||||
# `rustfmt` envoked not through `cargo fmt` but directly does not pick up Rust
|
||||
# edition in `Cargo.toml`. Thus duplicate here. See
|
||||
# https://github.com/mozilla/neqo/pull/1722 for details.
|
||||
edition = "2021"
|
||||
|
||||
comment_width=100
|
||||
wrap_comments=true
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ homepage = "https://github.com/mozilla/neqo/"
|
|||
repository = "https://github.com/mozilla/neqo/"
|
||||
authors = ["The Neqo Authors <necko@mozilla.com>"]
|
||||
version = "0.7.1"
|
||||
# Keep in sync with `.rustfmt.toml` `edition`.
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
# Don't increase beyond what Firefox is currently using:
|
||||
|
|
Загрузка…
Ссылка в новой задаче