Skip to content

Commit 356ca5f

Browse files
committed
Fixed some compile warnings from last commit
1 parent c20c958 commit 356ca5f

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

examples/bug-repro/02_present_bugs/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct App {
2626
struct State {
2727
window: Arc<Window>,
2828
instance: wgpu::Instance,
29-
device: wgpu::Device,
3029
queue: Option<wgpu::Queue>,
3130
surface: wgpu::Surface<'static>,
3231
surface_config: wgpu::SurfaceConfiguration,
@@ -128,8 +127,7 @@ impl State {
128127

129128
println!("Adapter: {:?}", adapter.get_info().name);
130129

131-
let (device, queue) =
132-
pollster::block_on(adapter.request_device(&Default::default())).unwrap();
130+
let (_, queue) = pollster::block_on(adapter.request_device(&Default::default())).unwrap();
133131

134132
let surface_format = surface.get_capabilities(&adapter).formats[0];
135133
let surface_config = wgpu::SurfaceConfiguration {
@@ -147,7 +145,6 @@ impl State {
147145
State {
148146
window,
149147
instance,
150-
device,
151148
queue: Some(queue),
152149
surface,
153150
surface_config,

wgpu/src/backend/wgpu_core.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,6 @@ fn map_pass_channel<V: Copy>(ops: Option<&Operations<V>>) -> wgc::command::PassC
441441
pub struct CoreSurface {
442442
pub(crate) context: ContextWgpuCore,
443443
id: wgc::id::SurfaceId,
444-
/// Configured device is needed to know which backend
445-
/// code to execute when acquiring a new frame.
446-
configured_device: Mutex<Option<wgc::id::DeviceId>>,
447444
/// The error sink with which to report errors.
448445
/// `None` if the surface has not been configured.
449446
error_sink: Mutex<Option<ErrorSink>>,
@@ -846,7 +843,6 @@ impl dispatch::InstanceInterface for ContextWgpuCore {
846843
Ok(CoreSurface {
847844
context: self.clone(),
848845
id,
849-
configured_device: Mutex::default(),
850846
error_sink: Mutex::default(),
851847
}
852848
.into())

0 commit comments

Comments
 (0)