Skip to content

Commit

Permalink
more clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Nov 14, 2024
1 parent 4f2465b commit d775670
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ pub struct Player {

impl Player {
async fn add_metadata(mut self, db: &mut MySqlConnection) -> Player {
match get_player_notes(db, self.id).await {
Some(notes) => self.notes = notes,
None => (),
if let Some(notes) = get_player_notes(db, self.id).await {
self.notes = notes
}

match get_player_jobbans(db, self.id).await {
Some(jobbans) => self.job_bans = jobbans,
None => (),
if let Some(jobbans) = get_player_jobbans(db, self.id).await {
self.job_bans = jobbans
}

if self.is_permabanned.is_some() && self.is_permabanned.unwrap() != 0 {
Expand Down Expand Up @@ -332,7 +330,7 @@ pub async fn get_recent_playtime(
days: i64,
) -> Json<Vec<Playtime>> {
let time_since = chrono::Utc
.with_ymd_and_hms(2000, 01, 01, 00, 00, 00)
.with_ymd_and_hms(2000, 1, 1, 0, 0, 0)
.unwrap()
.timestamp_millis();

Expand Down

0 comments on commit d775670

Please sign in to comment.