aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/api_client.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-02-06 12:59:01 +0100
committerGitHub <noreply@github.com>2023-02-06 11:59:01 +0000
commit3abc96fafe052f3c68ac7d1ae18e4fafee8e1f34 (patch)
treefbcc50070db039bf681e6147617d457f2f34d86d /atuin-client/src/api_client.rs
parentFix CI build badge (#683) (diff)
downloadatuin-3abc96fafe052f3c68ac7d1ae18e4fafee8e1f34.zip
Try to make clippy happy 🥺 (#686)
* Try to make clippy happy 🥺 * Fmt * I missed one (can't run clippy locally on airport wifi...)
Diffstat (limited to '')
-rw-r--r--atuin-client/src/api_client.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/atuin-client/src/api_client.rs b/atuin-client/src/api_client.rs
index b20d9378..44375c06 100644
--- a/atuin-client/src/api_client.rs
+++ b/atuin-client/src/api_client.rs
@@ -42,14 +42,14 @@ pub async fn register(
map.insert("email", email);
map.insert("password", password);
- let url = format!("{}/user/{}", address, username);
+ let url = format!("{address}/user/{username}");
let resp = reqwest::get(url).await?;
if resp.status().is_success() {
bail!("username already in use");
}
- let url = format!("{}/register", address);
+ let url = format!("{address}/register");
let client = reqwest::Client::new();
let resp = client
.post(url)
@@ -68,7 +68,7 @@ pub async fn register(
}
pub async fn login(address: &str, req: LoginRequest) -> Result<LoginResponse> {
- let url = format!("{}/login", address);
+ let url = format!("{address}/login");
let client = reqwest::Client::new();
let resp = client
@@ -111,7 +111,7 @@ pub async fn latest_version() -> Result<Version> {
impl<'a> Client<'a> {
pub fn new(sync_addr: &'a str, session_token: &'a str, key: String) -> Result<Self> {
let mut headers = HeaderMap::new();
- headers.insert(AUTHORIZATION, format!("Token {}", session_token).parse()?);
+ headers.insert(AUTHORIZATION, format!("Token {session_token}").parse()?);
Ok(Client {
sync_addr,