diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 2149c1aada3..65c25e15f7d 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -342,14 +342,9 @@ fn map_primitive_state(primitive: &wgt::PrimitiveState) -> web_sys::GpuPrimitive match primitive.polygon_mode { wgt::PolygonMode::Fill => (), - wgt::PolygonMode::Line => panic!( - "{:?} is not enabled for this backend", - wgt::Features::POLYGON_MODE_LINE - ), - wgt::PolygonMode::Point => panic!( - "{:?} is not enabled for this backend", - wgt::Features::POLYGON_MODE_POINT - ), + mode @ wgt::PolygonMode::Line | mode @ wgt::PolygonMode::Point => { + panic!("{mode:?} is not enabled for this backend",) + } } mapped