Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
jotjern committed Mar 19, 2024
1 parent a2bdef6 commit 7068ac0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/slack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,10 @@ async fn handle_slash_command(
message: incoming::Incoming<incoming::SlashCommandIncomingMessage>,
) -> outgoing::SlackOutgoingMessage {
let command_spin_mode = match message.payload.command.as_str() {
"/spin" => {
Some(SpinMode::Any)
},
"/spin-vegan" => {
Some(SpinMode::Vegan)
},
"/spin-vegetarian" => {
Some(SpinMode::Vegetarian)
},
_ => { None }
"/spin" => Some(SpinMode::Any),
"/spin-vegan" => Some(SpinMode::Vegan),
"/spin-vegetarian" => Some(SpinMode::Vegetarian),
_ => None,
};

match command_spin_mode {
Expand All @@ -167,7 +161,7 @@ async fn handle_slash_command(
message.envelope_id,
None,
))
},
}
Some(spin_mode) => {
let pizza = get_random_pizza(spin_mode);
let outgoing_message = outgoing::SlashCommandOutgoingMessage {
Expand Down

0 comments on commit 7068ac0

Please sign in to comment.