Skip to content

Commit 9218211

Browse files
committed
Update rustfmt.toml and run cargo fmt --all.
1 parent 588df31 commit 9218211

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

rustfmt.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
edition = "2024"
12
format_code_in_doc_comments = true
2-
imports_granularity = "crate"
3+
imports_granularity = 'crate'
4+
reorder_impl_items = true
5+
style_edition = "2021"
6+
use_field_init_shorthand = true
7+
wrap_comments = true

src/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
//!
8282
//! impl TryFrom<MyEnum> for Unit {
8383
//! type Error = MyEnum;
84+
//!
8485
//! fn try_from(enum_variant: MyEnum) -> Result<Self, Self::Error> {
8586
//! if let MyEnum::Unit = enum_variant {
8687
//! Ok(Unit)
@@ -99,6 +100,7 @@
99100
//!
100101
//! impl TryFrom<MyEnum> for Tuple {
101102
//! type Error = MyEnum;
103+
//!
102104
//! fn try_from(enum_variant: MyEnum) -> Result<Self, Self::Error> {
103105
//! if let MyEnum::Tuple(_0, _1) = enum_variant {
104106
//! Ok(Tuple(_0, _1))
@@ -117,6 +119,7 @@
117119
//!
118120
//! impl TryFrom<MyEnum> for Struct {
119121
//! type Error = MyEnum;
122+
//!
120123
//! fn try_from(enum_variant: MyEnum) -> Result<Self, Self::Error> {
121124
//! if let MyEnum::Struct { field_0, field_1 } = enum_variant {
122125
//! Ok(Struct { field_0, field_1 })
@@ -144,9 +147,12 @@
144147
//!
145148
//! ### Additional options specified by an `evt` attribute on enum:
146149
//!
147-
//! * `#[evt(derive(Clone, Copy))]`: Derives `Clone`, `Copy` on **every** variant.
148-
//! * `#[evt(module = "module1")]`: Generated structs are placed into `mod module1 { ... }`.
149-
//! * `#[evt(implement_marker_traits(MarkerTrait1))]`: Generated structs all `impl MarkerTrait1`.
150+
//! * `#[evt(derive(Clone, Copy))]`: Derives `Clone`, `Copy` on **every**
151+
//! variant.
152+
//! * `#[evt(module = "module1")]`: Generated structs are placed into `mod
153+
//! module1 { ... }`.
154+
//! * `#[evt(implement_marker_traits(MarkerTrait1))]`: Generated structs all
155+
//! `impl MarkerTrait1`.
150156
151157
extern crate alloc;
152158
extern crate proc_macro;

0 commit comments

Comments
 (0)