Skip to content

Commit

Permalink
fix && fmt
Browse files Browse the repository at this point in the history
Signed-off-by: danbugs <[email protected]>
  • Loading branch information
danbugs committed Dec 30, 2023
1 parent ddb3437 commit afbe104
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub mod common;
pub mod error_logs;
pub mod game;
pub mod pidgtm_compile_times;
pub mod player;
pub mod set;
pub mod tournament;
pub mod pidgtm_compile_times;
6 changes: 4 additions & 2 deletions lib/src/pidgtm_compile_times.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use anyhow::Result;
use diesel::prelude::*;
use smithe_database::{db_models::pidgtm_compile_times::PidgtmCompileTimes, schema::pidgtm_compile_times::dsl::*};
use smithe_database::{
db_models::pidgtm_compile_times::PidgtmCompileTimes, schema::pidgtm_compile_times::dsl::*,
};

pub fn insert_pidgtm_compile_time(tis: i32) -> Result<()> {
let new_pidgtm_compile_time = PidgtmCompileTimes::from(tis);
Expand All @@ -9,4 +11,4 @@ pub fn insert_pidgtm_compile_time(tis: i32) -> Result<()> {
.values(&new_pidgtm_compile_time)
.execute(&mut db_connection)?;
Ok(())
}
}
5 changes: 3 additions & 2 deletions src/pidgtm/compile.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use anyhow::Result;
use smithe_lib::{tournament::get_tournaments_from_requester_id, pidgtm_compile_times::insert_pidgtm_compile_time};
use smithe_lib::{
pidgtm_compile_times::insert_pidgtm_compile_time, tournament::get_tournaments_from_requester_id,
};

use super::map::{map_increment, map_operation};

Expand Down Expand Up @@ -50,7 +52,6 @@ pub async fn handle_compile(
// end timer
let elapsed = start.elapsed();


// get time in seconds
let tis = elapsed.as_secs();
insert_pidgtm_compile_time(tis as i32)?; // insert time into db
Expand Down

0 comments on commit afbe104

Please sign in to comment.