Skip to content

Commit 0c9cf99

Browse files
cybersoulKErichDonGubler
authored andcommitted
Update instance.rs
wgpu master doesn't compile, because of this typo
1 parent 94e040b commit 0c9cf99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wgpu-core/src/instance.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,14 @@ impl Instance {
293293
api_log!("Instance::enumerate_adapters");
294294

295295
let mut adapters = Vec::new();
296-
for (_, instance) in self
296+
for (_backend, instance) in self
297297
.instance_per_backend
298298
.iter()
299299
.filter(|(backend, _)| backends.contains(Backends::from(*backend)))
300300
{
301-
profiling::scope!("enumerating", &*format!("{:?}", backend));
301+
// NOTE: We might be using `profiling` without any features. The empty backend of this
302+
// macro emits no code, so unused code linting changes depending on the backend.
303+
profiling::scope!("enumerating", &*format!("{:?}", _backend));
302304

303305
let hal_adapters = unsafe { instance.enumerate_adapters(None) };
304306
for raw in hal_adapters {

0 commit comments

Comments
 (0)