Skip to content

Commit d775670

Browse files
committed
more clippy lints
1 parent 4f2465b commit d775670

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/player.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@ pub struct Player {
5757

5858
impl Player {
5959
async fn add_metadata(mut self, db: &mut MySqlConnection) -> Player {
60-
match get_player_notes(db, self.id).await {
61-
Some(notes) => self.notes = notes,
62-
None => (),
60+
if let Some(notes) = get_player_notes(db, self.id).await {
61+
self.notes = notes
6362
}
6463

65-
match get_player_jobbans(db, self.id).await {
66-
Some(jobbans) => self.job_bans = jobbans,
67-
None => (),
64+
if let Some(jobbans) = get_player_jobbans(db, self.id).await {
65+
self.job_bans = jobbans
6866
}
6967

7068
if self.is_permabanned.is_some() && self.is_permabanned.unwrap() != 0 {
@@ -332,7 +330,7 @@ pub async fn get_recent_playtime(
332330
days: i64,
333331
) -> Json<Vec<Playtime>> {
334332
let time_since = chrono::Utc
335-
.with_ymd_and_hms(2000, 01, 01, 00, 00, 00)
333+
.with_ymd_and_hms(2000, 1, 1, 0, 0, 0)
336334
.unwrap()
337335
.timestamp_millis();
338336

0 commit comments

Comments
 (0)