about summary refs log tree commit diff
path: root/clippy_dev/src/setup/vscode.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2022-09-28 14:27:32 +0200
committerPhilipp Krones <hello@philkrones.com>2022-09-28 14:27:32 +0200
commitbbcde666853d11f6f5f3bdc660f018cf7fc8cd71 (patch)
tree28df6eeea41c8e772bb65a172962f74282db1de1 /clippy_dev/src/setup/vscode.rs
parente5ce6d18df883f593e72f7958bebdc3ebcdbe85e (diff)
parent0f6932a1f7623663e50922225ea304340949c051 (diff)
downloadrust-bbcde666853d11f6f5f3bdc660f018cf7fc8cd71.tar.gz
rust-bbcde666853d11f6f5f3bdc660f018cf7fc8cd71.zip
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_dev/src/setup/vscode.rs')
-rw-r--r--clippy_dev/src/setup/vscode.rs19
1 files changed, 5 insertions, 14 deletions
diff --git a/clippy_dev/src/setup/vscode.rs b/clippy_dev/src/setup/vscode.rs
index d59001b2c66..dbcdc9b59e5 100644
--- a/clippy_dev/src/setup/vscode.rs
+++ b/clippy_dev/src/setup/vscode.rs
@@ -17,10 +17,7 @@ pub fn install_tasks(force_override: bool) {
             println!("info: the task file can be removed with `cargo dev remove vscode-tasks`");
             println!("vscode tasks successfully installed");
         },
-        Err(err) => eprintln!(
-            "error: unable to copy `{}` to `{}` ({})",
-            TASK_SOURCE_FILE, TASK_TARGET_FILE, err
-        ),
+        Err(err) => eprintln!("error: unable to copy `{TASK_SOURCE_FILE}` to `{TASK_TARGET_FILE}` ({err})"),
     }
 }
 
@@ -44,23 +41,17 @@ fn check_install_precondition(force_override: bool) -> bool {
                 return delete_vs_task_file(path);
             }
 
-            eprintln!(
-                "error: there is already a `task.json` file inside the `{}` directory",
-                VSCODE_DIR
-            );
+            eprintln!("error: there is already a `task.json` file inside the `{VSCODE_DIR}` directory");
             println!("info: use the `--force-override` flag to override the existing `task.json` file");
             return false;
         }
     } else {
         match fs::create_dir(vs_dir_path) {
             Ok(_) => {
-                println!("info: created `{}` directory for clippy", VSCODE_DIR);
+                println!("info: created `{VSCODE_DIR}` directory for clippy");
             },
             Err(err) => {
-                eprintln!(
-                    "error: the task target directory `{}` could not be created ({})",
-                    VSCODE_DIR, err
-                );
+                eprintln!("error: the task target directory `{VSCODE_DIR}` could not be created ({err})");
             },
         }
     }
@@ -82,7 +73,7 @@ pub fn remove_tasks() {
 
 fn delete_vs_task_file(path: &Path) -> bool {
     if let Err(err) = fs::remove_file(path) {
-        eprintln!("error: unable to delete the existing `tasks.json` file ({})", err);
+        eprintln!("error: unable to delete the existing `tasks.json` file ({err})");
         return false;
     }