谢谢 clippy

This commit is contained in:
shenjack 2024-08-24 16:23:55 +08:00
parent c0ea480832
commit 0cd3a6c4ae
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 6 additions and 4 deletions

View File

@ -114,8 +114,10 @@ async fn serve_mode(mut stop_receiver: Receiver<()>) -> anyhow::Result<()> {
event!(Level::INFO, "{}", "结束下载!".yellow()); event!(Level::INFO, "{}", "结束下载!".yellow());
// 结束 db // 结束 db
db_connect.close().await?; db_connect.close().await?;
if conf.serve.enable && web_waiter.is_some() { if conf.serve.enable {
web_waiter.unwrap().abort(); if let Some(web_waiter) = web_waiter {
web_waiter.abort();
}
} }
return Ok(()); return Ok(());
} }

View File

@ -2,7 +2,7 @@ use axum::{extract::State, routing::get, Json, Router};
use sea_orm::{ActiveEnum, DatabaseConnection}; use sea_orm::{ActiveEnum, DatabaseConnection};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::{config::ConfigFile, db_part}; use crate::db_part;
use migration::SaveId; use migration::SaveId;
/// 最后一个数据的信息 /// 最后一个数据的信息