From 469b873ec0ee84a52313f4a77d7535f774dfdcaf Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 19 Feb 2020 05:02:51 +0600 Subject: [PATCH] Fix rustfmt check --- teloxide-macros/src/command.rs | 13 ++----------- teloxide-macros/src/enum_attributes.rs | 12 ++---------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/teloxide-macros/src/command.rs b/teloxide-macros/src/command.rs index 69be6e58..c3cc4609 100644 --- a/teloxide-macros/src/command.rs +++ b/teloxide-macros/src/command.rs @@ -23,12 +23,7 @@ impl Command { new_name = rename_by_rule(name, &rename_rule); renamed = true; } - Ok(Self { - prefix, - description, - name: new_name, - renamed, - }) + Ok(Self { prefix, description, name: new_name, renamed }) } } @@ -55,9 +50,5 @@ fn parse_attrs(attrs: &[Attr]) -> Result { } } - Ok(CommandAttrs { - prefix, - description, - rename: rename_rule, - }) + Ok(CommandAttrs { prefix, description, rename: rename_rule }) } diff --git a/teloxide-macros/src/enum_attributes.rs b/teloxide-macros/src/enum_attributes.rs index b54dc9a6..7705e873 100644 --- a/teloxide-macros/src/enum_attributes.rs +++ b/teloxide-macros/src/enum_attributes.rs @@ -19,11 +19,7 @@ impl CommandEnum { _ => return Err("disallowed value".to_owned()), } } - Ok(Self { - prefix, - description, - rename_rule: rename, - }) + Ok(Self { prefix, description, rename_rule: rename }) } } @@ -50,9 +46,5 @@ fn parse_attrs(attrs: &[Attr]) -> Result { } } - Ok(CommandAttrs { - prefix, - description, - rename: rename_rule, - }) + Ok(CommandAttrs { prefix, description, rename: rename_rule }) }