From 6f44b7280e8986c475580be58a6c5efea2e9fcfb Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Sat, 5 Oct 2024 16:36:16 -0700 Subject: [PATCH] style: simplify string formatting for readability --- crates/cursor-core/src/auth/mod.rs | 4 ++-- crates/cursor-core/src/project/mod.rs | 4 ++-- crates/cursor-core/src/services/chat/session.rs | 2 +- crates/cursor-core/src/services/generate/mod.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/cursor-core/src/auth/mod.rs b/crates/cursor-core/src/auth/mod.rs index 3cc44bf..f3e4f15 100644 --- a/crates/cursor-core/src/auth/mod.rs +++ b/crates/cursor-core/src/auth/mod.rs @@ -141,7 +141,7 @@ async fn polling( } let Ok(mut response) = make_request( API2_HOST, - &format!("/auth/poll?uuid={}&verifier={}", uuid, verifier), + &format!("/auth/poll?uuid={uuid}&verifier={verifier}"), HttpMethod::Get, ) .send() @@ -220,7 +220,7 @@ pub async fn refresh() -> Result<(), JsValue> { .text() .await; #[cfg(debug_assertions)] - console::log_str(&format!("refresh token response: {}", response)); + console::log_str(&format!("refresh token response: {response}")); let access_token = serde_json::from_str::(&response) .map_err(JsError::from)? .access_token; diff --git a/crates/cursor-core/src/project/mod.rs b/crates/cursor-core/src/project/mod.rs index 5c8acd2..ac0f179 100644 --- a/crates/cursor-core/src/project/mod.rs +++ b/crates/cursor-core/src/project/mod.rs @@ -99,7 +99,7 @@ pub async fn generate_project(prompt: &str, handler: ProjectHandler) -> Result Result(&data) { #[cfg(debug_assertions)] - console::log_str(&format!("wrote: {}", text)); + console::log_str(&format!("wrote: {text}")); result_stream.write(&text); message.push_str(&data); } diff --git a/crates/cursor-core/src/services/generate/mod.rs b/crates/cursor-core/src/services/generate/mod.rs index 662987f..78df8c3 100644 --- a/crates/cursor-core/src/services/generate/mod.rs +++ b/crates/cursor-core/src/services/generate/mod.rs @@ -57,7 +57,7 @@ impl CodeGenerateService { serde_json::from_str::(&data) { #[cfg(debug_assertions)] - console::log_str(&format!("wrote: {}", text)); + console::log_str(&format!("wrote: {text}")); result_stream.write(&text); } }