refactor: 移除不必要的 return 关键字以简化代码结构
- 移除不必要的 `return` 关键字以简化代码结构。
This commit is contained in:
@@ -100,11 +100,11 @@ impl Db {
|
||||
let expire_time =
|
||||
NaiveDateTime::parse_from_str(&a.expire, "%Y-%m-%d %H:%M:%S")?;
|
||||
let now_time = Local::now().naive_local();
|
||||
return Ok(now_time < expire_time);
|
||||
Ok(now_time < expire_time)
|
||||
}
|
||||
// 如果没有找到,直接返回 false
|
||||
None => return Ok(false),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// 查询 token 的详细信息,返回 Option<Authorize> 如果存在
|
||||
|
||||
Reference in New Issue
Block a user