refactor: 移除不必要的 return 关键字以简化代码结构

- 移除不必要的 `return` 关键字以简化代码结构。
This commit is contained in:
2025-08-19 10:32:24 +08:00
parent 9854a8ad62
commit 51b8ce622d

View File

@@ -100,11 +100,11 @@ impl Db {
let expire_time = let expire_time =
NaiveDateTime::parse_from_str(&a.expire, "%Y-%m-%d %H:%M:%S")?; NaiveDateTime::parse_from_str(&a.expire, "%Y-%m-%d %H:%M:%S")?;
let now_time = Local::now().naive_local(); let now_time = Local::now().naive_local();
return Ok(now_time < expire_time); Ok(now_time < expire_time)
} }
// 如果没有找到,直接返回 false // 如果没有找到,直接返回 false
None => return Ok(false), None => return Ok(false),
}; }
} }
/// 查询 token 的详细信息,返回 Option<Authorize> 如果存在 /// 查询 token 的详细信息,返回 Option<Authorize> 如果存在