summaryrefslogtreecommitdiff
path: root/src/strava.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/strava.rs')
-rw-r--r--src/strava.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/strava.rs b/src/strava.rs
index df7d2a4..7df728c 100644
--- a/src/strava.rs
+++ b/src/strava.rs
@@ -1,12 +1,12 @@
+use crate::error::Error;
+use chrono::serde::ts_seconds;
+use chrono::DateTime;
+use chrono::Utc;
use reqwest;
use serde::Deserialize;
use serde::Serialize;
-use chrono::Utc;
-use chrono::DateTime;
-use chrono::serde::ts_seconds;
-use serde_json::Value;
use serde_json::from_value;
-use crate::error::Error;
+use serde_json::Value;
#[derive(Serialize, Deserialize, Debug)]
pub struct AthleteSummary {
@@ -25,11 +25,7 @@ pub struct Token {
pub athlete: AthleteSummary,
}
-pub fn exchange_token(
- client_id: &str,
- client_secret: &str,
- code: &str,
-) -> Result<Token, Error> {
+pub fn exchange_token(client_id: &str, client_secret: &str, code: &str) -> Result<Token, Error> {
let client = reqwest::blocking::Client::new();
let params = [
("client_id", client_id),