From d27b8436bcdd42696af88084dbec24560e3c3feb Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 25 Jun 2024 14:37:28 -0700 Subject: [PATCH] Fix build warnings This fixes some warnings that have been creeping into the build. --- .cargo/{config => config.toml} | 0 crates/openvino/src/core.rs | 3 ++- crates/openvino/tests/classify-alexnet.rs | 2 +- crates/openvino/tests/classify-inception.rs | 2 +- crates/openvino/tests/classify-mobilenet.rs | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) rename .cargo/{config => config.toml} (100%) diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/crates/openvino/src/core.rs b/crates/openvino/src/core.rs index 91a0c02..dbd704c 100644 --- a/crates/openvino/src/core.rs +++ b/crates/openvino/src/core.rs @@ -101,7 +101,8 @@ impl Core { Ok(devices) } - /// Gets properties related to device behaviour for this core. + /// Gets properties related to device behavior for this core. + /// /// The method extracts information that can be set via the [`set_property`] method. pub fn get_property(&self, device_name: &DeviceType, key: &PropertyKey) -> Result { let ov_device_name = cstr!(device_name.as_ref()); diff --git a/crates/openvino/tests/classify-alexnet.rs b/crates/openvino/tests/classify-alexnet.rs index 9ef87e6..85f557e 100644 --- a/crates/openvino/tests/classify-alexnet.rs +++ b/crates/openvino/tests/classify-alexnet.rs @@ -51,7 +51,7 @@ fn classify_alexnet() -> anyhow::Result<()> { let mut infer_request = executable_model.create_infer_request()?; infer_request.set_tensor("data", &tensor)?; infer_request.infer()?; - let mut results = infer_request.get_tensor(&output_port.get_name()?)?; + let results = infer_request.get_tensor(&output_port.get_name()?)?; // Sort results. let buffer = results.get_data::()?.to_vec(); diff --git a/crates/openvino/tests/classify-inception.rs b/crates/openvino/tests/classify-inception.rs index 30829a9..a82e525 100644 --- a/crates/openvino/tests/classify-inception.rs +++ b/crates/openvino/tests/classify-inception.rs @@ -48,7 +48,7 @@ fn classify_inception() -> anyhow::Result<()> { let mut infer_request = executable_model.create_infer_request()?; infer_request.set_tensor("input", &tensor)?; infer_request.infer()?; - let mut results = infer_request.get_tensor(&output_port.get_name()?)?; + let results = infer_request.get_tensor(&output_port.get_name()?)?; // Sort results. let buffer = results.get_data::()?.to_vec(); diff --git a/crates/openvino/tests/classify-mobilenet.rs b/crates/openvino/tests/classify-mobilenet.rs index ca812d7..dd34213 100644 --- a/crates/openvino/tests/classify-mobilenet.rs +++ b/crates/openvino/tests/classify-mobilenet.rs @@ -51,7 +51,7 @@ fn classify_mobilenet() -> anyhow::Result<()> { let mut infer_request = executable_model.create_infer_request()?; infer_request.set_tensor("input", &tensor)?; infer_request.infer()?; - let mut results = infer_request.get_tensor(&output_port.get_name()?)?; + let results = infer_request.get_tensor(&output_port.get_name()?)?; // Sort results. It is unclear why the MobileNet output indices are "off by one" but the // `.skip(1)` below seems necessary to get results that make sense (e.g. 763 = "revolver" vs 762