Skip to content

Commit 8b3cba9

Browse files
committed
chore: run cargo fmt
1 parent ee16f28 commit 8b3cba9

File tree

4 files changed

+24
-31
lines changed

4 files changed

+24
-31
lines changed

.rustfmt.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ array_width = 100
66
attr_fn_like_width = 100
77
fn_call_width = 100
88

9-
format_code_in_doc_comments = true
9+
format_code_in_doc_comments = false
1010
fn_single_line = true
1111
format_macro_matchers = true
12-
format_macro_bodues = true
12+
format_macro_bodies = true
1313
format_strings = true
1414
merge_derives = false
1515
overflow_delimited_expr = true
1616
reorder_modules = false
1717
use_field_init_shorthand = true
1818
use_try_shorthand = true
19-
wrap_comments = true
19+
wrap_comments = false
2020
where_single_line = true
2121
unstable_features = true
2222
empty_item_single_line = true

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,8 @@ pub fn derive_wrapper(input: TokenStream) -> TokenStream {
777777
/// * `amplify::WrapperMut`
778778
/// * [`AsMut`]
779779
/// * [`core::borrow::BorrowMut`]
780-
/// You may skip `AsMut` and `BorrowMut` implementations with `#[wrapper_mut(NoRefs)]`.
780+
/// You may skip `AsMut` and `BorrowMut` implementations with
781+
/// `#[wrapper_mut(NoRefs)]`.
781782
///
782783
/// You can implement additional derives, it they are implemented for the
783784
/// wrapped type, using `#[wrapper()]` proc macro:

src/wrapper.rs

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,9 @@ impl FromPath for Wrapper {
126126
const DERIVE: &'static str = "Wrapper";
127127
const NO_REFS: Self = Self::NoRefs;
128128

129-
fn default_set() -> Vec<Self> {
130-
vec![Wrapper::AsRef, Wrapper::Borrow]
131-
}
129+
fn default_set() -> Vec<Self> { vec![Wrapper::AsRef, Wrapper::Borrow] }
132130

133-
fn is_not_ref(&self) -> bool {
134-
*self != Wrapper::AsRef && *self != Wrapper::Borrow
135-
}
131+
fn is_not_ref(&self) -> bool { *self != Wrapper::AsRef && *self != Wrapper::Borrow }
136132

137133
fn from_path(path: &Path) -> Result<Option<Self>> {
138134
path.segments.first().map_or(
@@ -640,14 +636,14 @@ impl Wrapper {
640636
}
641637
}
642638
},
643-
Wrapper::NoRefs
644-
| Wrapper::Hex
645-
| Wrapper::Exp
646-
| Wrapper::NumberFmt
647-
| Wrapper::RangeOps
648-
| Wrapper::MathOps
649-
| Wrapper::BoolOps
650-
| Wrapper::BitOps => unreachable!(),
639+
Wrapper::NoRefs |
640+
Wrapper::Hex |
641+
Wrapper::Exp |
642+
Wrapper::NumberFmt |
643+
Wrapper::RangeOps |
644+
Wrapper::MathOps |
645+
Wrapper::BoolOps |
646+
Wrapper::BitOps => unreachable!(),
651647
}
652648
}
653649
}
@@ -657,13 +653,9 @@ impl FromPath for WrapperMut {
657653
const DERIVE: &'static str = "WrapperMut";
658654
const NO_REFS: Self = Self::NoRefs;
659655

660-
fn default_set() -> Vec<Self> {
661-
vec![WrapperMut::AsMut, WrapperMut::BorrowMut]
662-
}
656+
fn default_set() -> Vec<Self> { vec![WrapperMut::AsMut, WrapperMut::BorrowMut] }
663657

664-
fn is_not_ref(&self) -> bool {
665-
*self != WrapperMut::AsMut && *self != WrapperMut::BorrowMut
666-
}
658+
fn is_not_ref(&self) -> bool { *self != WrapperMut::AsMut && *self != WrapperMut::BorrowMut }
667659

668660
fn from_path(path: &Path) -> Result<Option<Self>> {
669661
path.segments.first().map_or(
@@ -990,11 +982,11 @@ impl WrapperMut {
990982
}
991983
}
992984
},
993-
WrapperMut::NoRefs
994-
| WrapperMut::RangeMut
995-
| WrapperMut::MathAssign
996-
| WrapperMut::BoolAssign
997-
| WrapperMut::BitAssign => unreachable!(),
985+
WrapperMut::NoRefs |
986+
WrapperMut::RangeMut |
987+
WrapperMut::MathAssign |
988+
WrapperMut::BoolAssign |
989+
WrapperMut::BitAssign => unreachable!(),
998990
}
999991
}
1000992
}

syn/src/attr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ impl ParametrizedAttr {
626626
/// [`AttrReq::path_req`], [`AttrReq::integer_req`],
627627
/// [`AttrReq::float_req`], [`AttrReq::char_req`],
628628
/// [`AttrReq::bytes_req`], [`AttrReq::string_req`] correspondingly.
629-
/// 2. [`ParametrizedAttr::paths`] values
630-
/// matching ones specified in [`AttrReq::arg_req`] with values set to
629+
/// 2. [`ParametrizedAttr::paths`] values matching ones specified in
630+
/// [`AttrReq::arg_req`] with values set to
631631
/// [`crate::ListReq::Predefined::default`] are moved into
632632
/// [`ParametrizedAttr::args`] field.
633633
pub fn check(&mut self, req: AttrReq) -> Result<(), Error> {

0 commit comments

Comments
 (0)