aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-10-16 16:36:52 +0200
committerMax Audron <audron@cocaine.farm>2021-10-16 16:36:52 +0200
commit3a79df9523429c0ee36825328455fff9dfb4669a (patch)
treeb646ab79e883860d97b01d682cca9f7ec8047a94 /macros/src
parentrework configuration to allow extensibility by hooks (diff)
format code
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/macro_types/mod.rs3
-rw-r--r--macros/src/macro_types/privmsg.rs5
2 files changed, 6 insertions, 2 deletions
diff --git a/macros/src/macro_types/mod.rs b/macros/src/macro_types/mod.rs
index 2910707..0afec11 100644
--- a/macros/src/macro_types/mod.rs
+++ b/macros/src/macro_types/mod.rs
@@ -24,7 +24,8 @@ impl Parse for Items {
let mut items: Vec<Item> = Vec::new();
while !input.is_empty() {
- if input.peek(syn::Ident) && input.peek2(syn::token::Paren) || input.peek(Token![async]) {
+ if input.peek(syn::Ident) && input.peek2(syn::token::Paren) || input.peek(Token![async])
+ {
items.push(input.parse()?)
} else {
return Err(input.error("line was not of expected format"));
diff --git a/macros/src/macro_types/privmsg.rs b/macros/src/macro_types/privmsg.rs
index 247d1b7..4cc1d5e 100644
--- a/macros/src/macro_types/privmsg.rs
+++ b/macros/src/macro_types/privmsg.rs
@@ -1,4 +1,7 @@
-use syn::{Expr, Token, parse::{Parse, ParseStream}};
+use syn::{
+ parse::{Parse, ParseStream},
+ Expr, Token,
+};
pub struct Item {
pub msg: Expr,