From 634edeea26570e789b563e9110c8c5686344d295 Mon Sep 17 00:00:00 2001 From: Peter Kolloch Date: Thu, 20 Jun 2024 20:20:46 +0200 Subject: [PATCH] upstream_wrapper: Reformat --- tools/upstream_wrapper/README.md | 2 +- tools/upstream_wrapper/src/main.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/upstream_wrapper/README.md b/tools/upstream_wrapper/README.md index 979755521f..3b1c8975c6 100644 --- a/tools/upstream_wrapper/README.md +++ b/tools/upstream_wrapper/README.md @@ -12,4 +12,4 @@ bazel run @rules_rust//tools/upstream_wrapper:rustfmt ``` Alternatively, look at the [bazel_env example](../../examples/bazel_env/) -to include them in the users path with direnv. \ No newline at end of file +to include them in the users path with direnv. diff --git a/tools/upstream_wrapper/src/main.rs b/tools/upstream_wrapper/src/main.rs index f49628ddb9..6d6e167c26 100644 --- a/tools/upstream_wrapper/src/main.rs +++ b/tools/upstream_wrapper/src/main.rs @@ -1,6 +1,6 @@ +use std::ffi::OsString; use std::path::PathBuf; use std::process::{exit, Command}; -use std::ffi::OsString; const WRAPPED_TOOL_NAME: &str = env!("WRAPPED_TOOL_NAME"); const WRAPPED_TOOL_TARGET: &str = env!("WRAPPED_TOOL_TARGET"); @@ -21,7 +21,9 @@ fn main() { ); } - let tool_directory = wrapped_tool_path.parent().expect("parent directory of tool binary"); + let tool_directory = wrapped_tool_path + .parent() + .expect("parent directory of tool binary"); let old_path = std::env::var_os("PATH").unwrap_or_default(); let mut new_path = OsString::from(tool_directory); new_path.push(PATH_SEPARATOR);