chore: FnOnce is more general

This commit is contained in:
mokurin000
2025-07-31 02:05:55 +08:00
parent 7742a8b011
commit 417b3c55bc

View File

@@ -12,7 +12,7 @@ use spdlog::info;
pub async fn login_action<R>( pub async fn login_action<R>(
client: &AsyncClient, client: &AsyncClient,
user_id: u32, user_id: u32,
action: impl AsyncFn(UserLoginApiResp) -> R, action: impl AsyncFnOnce(UserLoginApiResp) -> R,
) -> Result<R, ApiError> { ) -> Result<R, ApiError> {
let login = UserLoginApi::new(user_id); let login = UserLoginApi::new(user_id);
let date_time = login.date_time; let date_time = login.date_time;