Clippy fixes

This commit is contained in:
mdecimus
2024-06-18 15:30:41 +02:00
parent aa4a11baf7
commit ae2a67422f
15 changed files with 459 additions and 148 deletions

View File

@@ -96,10 +96,7 @@ pub async fn exec(ctx: PluginContext<'_>) -> Variable {
let span = ctx.span;
let address = ctx.arguments[0].to_string();
let timeout = Duration::from_secs(std::cmp::max(
std::cmp::min(ctx.arguments[1].to_integer() as u64, 60),
5,
));
let timeout = Duration::from_secs((ctx.arguments[1].to_integer() as u64).clamp(5, 60));
// Send message to address
match pyzor_send_message(address.as_ref(), timeout, &request).await {
Ok(response) => response.into(),