Skip to content

Commit 83197af

Browse files
fix: linting
1 parent bbd64de commit 83197af

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

crates/eqx_app/src/app.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::module::Module;
2-
use env_logger;
32
use log::{info, LevelFilter};
43

4+
#[derive(Default)]
55
pub struct App {
66
pub(crate) enabled_modules: Vec<Box<dyn Module>>,
77
}
@@ -27,11 +27,3 @@ impl App {
2727
}
2828
}
2929
}
30-
31-
impl Default for App {
32-
fn default() -> Self {
33-
Self {
34-
enabled_modules: vec![],
35-
}
36-
}
37-
}

crates/eqx_app/src/module.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
pub trait Module {
2-
/// Called by [`App`] upon being added to the [`enabled_modules`] list.
32
fn setup(&mut self);
43

5-
/// Called by [`App`] upon its launch.
64
fn init(&mut self);
75
}

crates/eqx_window/src/window.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use eqx_app::prelude::Module;
2-
use wgpu::{MemoryHints, RenderPassDescriptor, RenderPipeline, RenderPipelineDescriptor};
32

43
use winit::{
54
event::*,
@@ -50,7 +49,7 @@ impl<'a> State<'a> {
5049
label: None,
5150
required_limits: wgpu::Limits::default(),
5251
required_features: wgpu::Features::default(),
53-
memory_hints: MemoryHints::default(),
52+
memory_hints: wgpu::MemoryHints::default(),
5453
},
5554
None,
5655
)
@@ -91,7 +90,7 @@ impl<'a> State<'a> {
9190
push_constant_ranges: &[],
9291
});
9392

94-
let render_pipeline = device.create_render_pipeline(&RenderPipelineDescriptor {
93+
let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
9594
label: Some("RenderPipeline"),
9695
layout: Some(&render_pipeline_layout),
9796
vertex: wgpu::VertexState {
@@ -145,7 +144,7 @@ impl<'a> State<'a> {
145144
}
146145

147146
fn resize(&mut self, size: winit::dpi::PhysicalSize<u32>) {
148-
if (size.width > 0 && size.height > 0) {
147+
if size.width > 0 && size.height > 0 {
149148
self.size = size;
150149
self.config.width = size.width;
151150
self.config.height = size.height;
@@ -154,7 +153,9 @@ impl<'a> State<'a> {
154153
}
155154

156155
fn process_input(&self, event: &WindowEvent) -> bool {
157-
false
156+
match event {
157+
_ => false,
158+
}
158159
}
159160

160161
fn update(&self) {}
@@ -173,7 +174,7 @@ impl<'a> State<'a> {
173174
});
174175

175176
{
176-
let mut render_pass = encoder.begin_render_pass(&RenderPassDescriptor {
177+
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
177178
label: Some("RenderPass"),
178179
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
179180
view: &view,
@@ -227,7 +228,7 @@ impl Module for WindowDisplay {
227228
ref event,
228229
window_id,
229230
} if window_id == state.window.id() => {
230-
if (!state.process_input(event)) {
231+
if !state.process_input(event) {
231232
match event {
232233
WindowEvent::CloseRequested
233234
| WindowEvent::KeyboardInput {

0 commit comments

Comments
 (0)