From 20c9aa4f02013bf12889c3e73f78682e44c6e5ef Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Sat, 7 Aug 2021 15:13:33 +0200 Subject: Fix warnings --- zluda_ml/src/impl.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'zluda_ml/src') diff --git a/zluda_ml/src/impl.rs b/zluda_ml/src/impl.rs index 4a05c50..584d4aa 100644 --- a/zluda_ml/src/impl.rs +++ b/zluda_ml/src/impl.rs @@ -5,8 +5,6 @@ use std::{ ptr, }; -use ocl_core::ClVersions; - use crate::nvml::nvmlReturn_t; macro_rules! stringify_nmvlreturn_t { @@ -74,7 +72,7 @@ static mut DEVICE: Option = None; pub(crate) fn init_v2() -> Result<(), nvmlReturn_t> { let platforms = ocl_core::get_platform_ids()?; - let mut device = platforms.iter().find_map(|plat| { + let device = platforms.iter().find_map(|plat| { let devices = ocl_core::get_device_ids(plat, Some(ocl_core::DeviceType::GPU), None).ok()?; for dev in devices { let vendor = ocl_core::get_device_info(dev, ocl_core::DeviceInfo::VendorId).ok()?; @@ -103,7 +101,7 @@ pub(crate) fn init_with_flags() -> Result<(), nvmlReturn_t> { } impl From for nvmlReturn_t { - fn from(err: ocl_core::Error) -> Self { + fn from(_: ocl_core::Error) -> Self { nvmlReturn_t::NVML_ERROR_UNKNOWN } } -- cgit v1.2.3