fmt and clippy
This commit is contained in:
parent
0a6b78a007
commit
fb1cbab4eb
|
@ -68,7 +68,7 @@ impl Inbox {
|
|||
)
|
||||
})
|
||||
.map(|_: usize| msg.recipient.clone())
|
||||
.map_err(|e| {
|
||||
.map_err(|e| {
|
||||
eprintln!("{:?}", e);
|
||||
String::from("Beim Speichern deiner Nachricht ist ein Fehler aufgetreten. Bitte sag kageru Bescheid.")
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::collections::HashMap;
|
|||
lazy_static! {
|
||||
static ref ROLE_CONFIG: Vec<ReactableMessage> = {
|
||||
let c = serde_json::from_str(
|
||||
&std::fs::read_to_string("reaction_config.json").unwrap_or("[]".to_string()),
|
||||
&std::fs::read_to_string("reaction_config.json").unwrap_or_else(|_| "[]".to_string()),
|
||||
)
|
||||
.expect("Could not read reaction config");
|
||||
eprintln!("Read reaction config: {:?}", c);
|
||||
|
@ -38,10 +38,12 @@ macro_rules! role_action {
|
|||
}
|
||||
|
||||
pub(crate) async fn reaction_added(ctx: Context, reaction: Reaction) -> serenity::Result<()> {
|
||||
Ok(role_action!(reaction, ctx, add_role))
|
||||
role_action!(reaction, ctx, add_role);
|
||||
Ok(())
|
||||
}
|
||||
pub(crate) async fn reaction_removed(ctx: Context, reaction: Reaction) -> serenity::Result<()> {
|
||||
Ok(role_action!(reaction, ctx, remove_role))
|
||||
role_action!(reaction, ctx, remove_role);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user