Fix some cargo clippy hints

This commit is contained in:
Basile Henry 2020-07-05 23:50:39 +02:00
parent 6114ae03f0
commit 4f7d500b25
2 changed files with 7 additions and 13 deletions

View File

@ -7,23 +7,17 @@ fn main() {
println!("cargo:rerun-if-env-changed=ONNXRUNTIME_LIB_DIR");
println!("cargo:rerun-if-env-changed=ONNXRUNTIME_INCLUDE_DIR");
match std::env::var("ONNXRUNTIME_LIB_DIR") {
Ok(dirs) => {
for dir in dirs.split(":") {
println!("cargo:rustc-link-search={}", dir);
}
if let Ok(dirs) = std::env::var("ONNXRUNTIME_LIB_DIR") {
for dir in dirs.split(':') {
println!("cargo:rustc-link-search={}", dir);
}
Err(_) => (),
};
let mut clang_args = Vec::new();
match std::env::var("ONNXRUNTIME_INCLUDE_DIR") {
Ok(dirs) => {
for dir in dirs.split(":") {
clang_args.push(format!("-I{}", dir));
}
if let Ok(dirs) = std::env::var("ONNXRUNTIME_INCLUDE_DIR") {
for dir in dirs.split(':') {
clang_args.push(format!("-I{}", dir));
}
Err(_) => (),
};
println!("cargo:rustc-link-lib=onnxruntime");

View File

@ -334,7 +334,7 @@ impl Session {
ArgumentInfo {
session: &self,
ix,
arg_type: arg_type,
arg_type,
info: RefCell::new(None),
}
}