Skip to content

Commit 3cd88e2

Browse files
Merge #3065
3065: Use `slice::iter` instead of `into_iter` to avoid future breakage r=kvark a=TethysSvensson Use `slice::iter` instead of `into_iter` to avoid future breakage `an_array.into_iter()` currently just works because of the autoref feature, which then calls `<[T] as IntoIterator>::into_iter`. But in the future, arrays will implement `IntoIterator`, too. In order to avoid problems in the future, the call is replaced by `iter()` which is shorter and more explicit. A crater run showed that your crate is affected by a potential future change. See rust-lang/rust#65819 for more information. Co-authored-by: Mathias Svensson <[email protected]>
2 parents 3cd5b62 + ad5e910 commit 3cd88e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/gl/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,12 @@ impl PhysicalDevice {
531531
let inferred_device_type = if vendor_lower.contains("qualcomm")
532532
|| vendor_lower.contains("intel")
533533
|| strings_that_imply_integrated
534-
.into_iter()
534+
.iter()
535535
.any(|&s| renderer_lower.contains(s))
536536
{
537537
hal::adapter::DeviceType::IntegratedGpu
538538
} else if strings_that_imply_cpu
539-
.into_iter()
539+
.iter()
540540
.any(|&s| renderer_lower.contains(s))
541541
{
542542
hal::adapter::DeviceType::Cpu

0 commit comments

Comments
 (0)