mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix(lint): resolve clippy warnings from rust 1.98
- photo.rs: chunks_exact(4)/(2) -> as_chunks::<N>().0 (chunks_exact_to_as_chunks, the new lint prefers the compile-time-checked slice split) - send.rs: box the Task inside SendError so the error fits the result_large_err limit (Task is ~400 bytes; the error now moves through Result as a pointer); unbox with *task at the two enqueue_retry call sites (handlers/urls.rs, handlers/callback.rs) cargo clippy --workspace --all-targets is now warning-free; the remaining proc-macro-error2 future-incompat note is upstream (teloxide -> aquamarine) and unfixable locally. Full test suite passes.
This commit is contained in:
@@ -83,7 +83,7 @@ pub async fn callback_query_handler(bot: Bot, query: CallbackQuery) -> Result<()
|
||||
task,
|
||||
}) => {
|
||||
log::info!("forward queued for retry in {delay_seconds:.1}s");
|
||||
enqueue_retry(&TASK_QUEUE, task, delay_seconds).await;
|
||||
enqueue_retry(&TASK_QUEUE, *task, delay_seconds).await;
|
||||
bot.answer_callback_query(callback_query_id)
|
||||
.text("Forward queued for retry.")
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user