Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ddboline committed Jan 1, 2025
1 parent 1ce446f commit 4293f6f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
10 changes: 8 additions & 2 deletions fitbit_lib/src/fitbit_statistics_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,14 @@ impl FitbitStatisticsSummary {
count: i64,
}

let query =
Self::get_fitbit_statistics_query("count(*)", start_date.as_ref(), end_date.as_ref(), None, None, "")?;
let query = Self::get_fitbit_statistics_query(
"count(*)",
start_date.as_ref(),
end_date.as_ref(),
None,
None,
"",
)?;
let conn = pool.get().await?;
let count: Count = query.fetch_one(&conn).await?;

Expand Down
10 changes: 8 additions & 2 deletions fitbit_lib/src/scale_measurement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,14 @@ impl ScaleMeasurement {
count: i64,
}

let query =
Self::get_scale_measurement_query("count(*)", start_date.as_ref(), end_date.as_ref(), None, None, "")?;
let query = Self::get_scale_measurement_query(
"count(*)",
start_date.as_ref(),
end_date.as_ref(),
None,
None,
"",
)?;
let conn = pool.get().await?;
let count: Count = query.fetch_one(&conn).await?;

Expand Down
10 changes: 8 additions & 2 deletions garmin_models/src/fitbit_activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,14 @@ impl FitbitActivity {
count: i64,
}

let query =
Self::get_fitbit_activity_query("count(*)", start_date.as_ref(), end_date.as_ref(), None, None, "")?;
let query = Self::get_fitbit_activity_query(
"count(*)",
start_date.as_ref(),
end_date.as_ref(),
None,
None,
"",
)?;
let conn = pool.get().await?;
let count: Count = query.fetch_one(&conn).await?;

Expand Down
3 changes: 2 additions & 1 deletion garmin_models/src/garmin_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ impl GarminSync {
bucket: &str,
pool: &PgPool,
) -> Result<(usize, usize), Error> {
exponential_retry(|| async move { self.get_and_process_keys_impl(bucket, pool).await }).await
exponential_retry(|| async move { self.get_and_process_keys_impl(bucket, pool).await })
.await
}

async fn process_files(
Expand Down
13 changes: 9 additions & 4 deletions garmin_models/src/strava_activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ impl StravaActivity {
count: i64,
}

let query =
Self::get_strava_activity_query("count(*)", start_date.as_ref(), end_date.as_ref(), None, None, "")?;
let query = Self::get_strava_activity_query(
"count(*)",
start_date.as_ref(),
end_date.as_ref(),
None,
None,
"",
)?;
let conn = pool.get().await?;
let count: Count = query.fetch_one(&conn).await?;

Expand Down Expand Up @@ -362,8 +368,7 @@ mod tests {
let buf = include_str!("../../tests/data/strava_training_activities.json");
let js: StravaActivityHarJson = serde_json::from_str(buf)?;
let activities: Vec<StravaActivity> = js.models.into_iter().map(Into::into).collect();
println!("{activities:#?}");
assert!(false);
assert_eq!(activities.len(), 20);
Ok(())
}
}

0 comments on commit 4293f6f

Please sign in to comment.