Skip to content

Commit f0e5a71

Browse files
authored
clippy: use variables directly in the format!() string (#175)
This updates some build logic to fix warnings seen with `cargo clippy`.
1 parent 80365cf commit f0e5a71

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/openvino-sys/build.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn main() {
6565
record_library_path(path);
6666
} else {
6767
println!("cargo:warning=openvino-sys cannot find the `openvino_c` library in any of the library search paths: {:?}", &library_search_paths);
68-
println!("cargo:warning=Proceeding with an empty value of {}; users must specify this location at runtime, e.g. `Core::new(Some(...))`.", ENV_OPENVINO_LIB_PATH);
68+
println!("cargo:warning=Proceeding with an empty value of {ENV_OPENVINO_LIB_PATH}; users must specify this location at runtime, e.g. `Core::new(Some(...))`.");
6969
record_library_path(PathBuf::new());
7070
}
7171

@@ -128,7 +128,7 @@ fn add_library_search_path<P: AsRef<Path>>(path: P) {
128128

129129
/// Add a dynamically-linked library.
130130
fn add_dynamically_linked_library(library: &str) {
131-
println!("cargo:rustc-link-lib=dylib={}", library);
131+
println!("cargo:rustc-link-lib=dylib={library}");
132132
}
133133

134134
/// Find all of the necessary libraries to link using the `openvino_finder`. This will return the
@@ -160,10 +160,7 @@ fn find_libraries_in_existing_installation() -> Vec<PathBuf> {
160160
dirs.push(dir);
161161
}
162162
} else {
163-
panic!(
164-
"Unable to find an existing installation of library: {}",
165-
library
166-
);
163+
panic!("Unable to find an existing installation of library: {library}");
167164
}
168165
}
169166
dirs

0 commit comments

Comments
 (0)