Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
buj committed Aug 25, 2024
1 parent b024198 commit 1e9c731
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ impl Webhook {
/// Send a message.
///
/// Will try indefinitely until success.
pub fn send<L: Logger>(&self, message: impl Fn(MessageBuilder) -> MessageBuilder, logger: &mut L) -> Message {
pub fn send<L: Logger>(
&self,
message: impl Fn(MessageBuilder) -> MessageBuilder,
logger: &mut L,
) -> Message {
let mut message: Message = message(Default::default()).0;

let mut bodies: Vec<Vec<u8>> = vec![];
Expand Down Expand Up @@ -193,7 +197,9 @@ impl Webhook {
break message;
}
Err(why) => {
logger.error(&format!("Error sending request: {why}, retrying in 1 minute..."));
logger.error(&format!(
"Error sending request: {why}, retrying in 1 minute..."
));
std::thread::sleep(Duration::from_secs(60));
}
}
Expand Down

0 comments on commit 1e9c731

Please sign in to comment.