chore: 升级依赖,修正新引入的 clippy 规则

This commit is contained in:
amtoaer
2025-05-19 14:50:03 +08:00
parent f52724b974
commit bafb4af8dd
4 changed files with 237 additions and 153 deletions

View File

@@ -112,7 +112,7 @@ impl<'a> Video<'a> {
pub async fn get_danmaku_writer(&self, page: &'a PageInfo) -> Result<DanmakuWriter> {
let tasks = FuturesUnordered::new();
for i in 1..=(page.duration + 359) / 360 {
for i in 1..=page.duration.div_ceil(360) {
tasks.push(self.get_danmaku_segment(page, i as i64));
}
let result: Vec<Vec<DanmakuElem>> = tasks.try_collect().await?;

View File

@@ -35,8 +35,7 @@ impl From<Result<ExecutionStatus>> for ExecutionStatus {
// 使用 io::Error 包裹的 reqwest::Error
if io_err.kind() == io::ErrorKind::Other
&& io_err.get_ref().is_some_and(|e| {
e.downcast_ref::<reqwest::Error>()
.is_some_and(|e| is_ignored_reqwest_error(e))
e.downcast_ref::<reqwest::Error>().is_some_and(is_ignored_reqwest_error)
})
{
return ExecutionStatus::Ignored(err);