Skip to content

Commit 3c32aca

Browse files
committed
Fixes for new clippy lints.
1 parent f87a294 commit 3c32aca

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/device.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -917,16 +917,14 @@ impl Device {
917917
/// Determine if the device supports the given half floating point capability.
918918
/// Returns true if the device supports it, false otherwise.
919919
pub fn supports_half(&self, min_fp_capability: cl_device_fp_config) -> bool {
920-
self.half_fp_config()
921-
.map_or(false, |fp| 0 < fp & min_fp_capability)
920+
self.half_fp_config().is_ok_and(|fp| 0 < fp & min_fp_capability)
922921
}
923922
/// Determine if the device supports the given double floating point capability.
924923
/// Returns true if the device supports it, false otherwise.
925924
///
926925
/// CL_VERSION_1_2
927926
pub fn supports_double(&self, min_fp_capability: cl_device_fp_config) -> bool {
928-
self.double_fp_config()
929-
.map_or(false, |fp| 0 < fp & min_fp_capability)
927+
self.double_fp_config().is_ok_and(|fp| 0 < fp & min_fp_capability)
930928
}
931929

932930
/// Determine if the device supports SVM and, if so, what kind of SVM.

0 commit comments

Comments
 (0)