From b7a1f82f569c0b3a22214ea40319833edd677932 Mon Sep 17 00:00:00 2001 From: Kenneth Loeffler Date: Fri, 30 Jun 2023 11:03:37 -0700 Subject: [PATCH] Fix cli clippy lints (#681) The second in a series of PRs that aim to get CI passing --- src/cli/fmt_project.rs | 2 +- src/cli/init.rs | 2 +- src/cli/serve.rs | 2 +- src/cli/upload.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/fmt_project.rs b/src/cli/fmt_project.rs index 48a52bd6..9c3e88d3 100644 --- a/src/cli/fmt_project.rs +++ b/src/cli/fmt_project.rs @@ -24,7 +24,7 @@ impl FmtProjectCommand { let serialized = serde_json::to_string_pretty(&project) .context("could not re-encode project file as JSON")?; - fs_err::write(&project.file_location, &serialized) + fs_err::write(&project.file_location, serialized) .context("could not write back to project file")?; Ok(()) diff --git a/src/cli/init.rs b/src/cli/init.rs index 795ec04d..b770f55d 100644 --- a/src/cli/init.rs +++ b/src/cli/init.rs @@ -184,7 +184,7 @@ fn try_git_init(path: &Path, git_ignore: &str) -> Result<(), anyhow::Error> { /// already inside a Git repository. fn should_git_init(path: &Path) -> bool { let result = Command::new("git") - .args(&["rev-parse", "--is-inside-work-tree"]) + .args(["rev-parse", "--is-inside-work-tree"]) .stdout(Stdio::null()) .stderr(Stdio::null()) .current_dir(path) diff --git a/src/cli/serve.rs b/src/cli/serve.rs index 0e35785e..f89e4387 100644 --- a/src/cli/serve.rs +++ b/src/cli/serve.rs @@ -39,7 +39,7 @@ impl ServeCommand { let vfs = Vfs::new_default(); - let session = Arc::new(ServeSession::new(vfs, &project_path)?); + let session = Arc::new(ServeSession::new(vfs, project_path)?); let ip = self .address diff --git a/src/cli/upload.rs b/src/cli/upload.rs index d8404099..ce7a2b5d 100644 --- a/src/cli/upload.rs +++ b/src/cli/upload.rs @@ -176,7 +176,7 @@ fn do_upload_open_cloud( log::debug!("Uploading to Roblox..."); let response = client - .post(&url) + .post(url) .header("x-api-key", api_key) .header(CONTENT_TYPE, "application/xml") .header(ACCEPT, "application/json")