Skip to content

Commit f5f47a8

Browse files
chore: fix clippy lints (#6112)
### Description Fix some clippy lints that snuck in: - The clippy lints weren't blocking for `turborepo-auth` crate due to the lack of `#![deny(clippy:all)]` - Unsure why I get the clippy warnings locally, but they don't show up on CI. Clippy is running on this crate in CI, but the lints don't show up. Either way, the lints were correct as the `move` directive in the `async` block means that the redeclaration is unnecessary since they already are referenced in the block. ### Testing Instructions CI Closes TURBO-1429 --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
1 parent d4acafd commit f5f47a8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

crates/turborepo-auth/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(clippy::all)]
2+
13
#[cfg(not(test))]
24
use std::net::SocketAddr;
35
#[cfg(test)]
@@ -57,7 +59,7 @@ where
5759
{
5860
if let Err(err) = set_token() {
5961
error!("could not logout. Something went wrong: {}", err);
60-
return Err(err.into());
62+
return Err(err);
6163
}
6264

6365
println!("{}", ui.apply(GREY.apply_to(">>> Logged out")));
@@ -80,7 +82,7 @@ where
8082
if let Ok(token) = std::fs::read_to_string(token_path) {
8183
if let Ok(response) = api_client.get_user(&token).await {
8284
println!("{}", ui.apply(BOLD.apply_to("Existing token found!")));
83-
print_cli_authorized(&response.user.email, &ui);
85+
print_cli_authorized(&response.user.email, ui);
8486
return Ok(());
8587
}
8688
}
@@ -231,7 +233,7 @@ where
231233
.any(|team| team.slug == sso_team)
232234
{
233235
println!("{}", ui.apply(BOLD.apply_to("Existing token found!")));
234-
print_cli_authorized(&response_user.user.email, &ui);
236+
print_cli_authorized(&response_user.user.email, ui);
235237
return Ok(());
236238
}
237239
}

crates/turborepo-lib/src/daemon/server.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ mod test {
447447
let (tx, rx) = oneshot::channel::<CloseReason>();
448448
let exit_signal = rx.map(|_result| CloseReason::Interrupt);
449449
let handle = tokio::task::spawn(async move {
450-
let repo_root = repo_root;
451-
let daemon_root = daemon_root;
452450
serve(
453451
&repo_root,
454452
cookie_dir,
@@ -540,7 +538,6 @@ mod test {
540538
let server_repo_root = repo_root.clone();
541539
let handle = tokio::task::spawn(async move {
542540
let repo_root = server_repo_root;
543-
let daemon_root = daemon_root;
544541
serve(
545542
&repo_root,
546543
cookie_dir,

0 commit comments

Comments
 (0)