Skip to content

Commit a3bca7e

Browse files
authored
Fix ci (#1024)
* fix format * fix clippy * used fixed nightly
1 parent 1398d78 commit a3bca7e

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103

104104
- uses: actions-rs/toolchain@v1
105105
with:
106-
toolchain: nightly
106+
toolchain: nightly-2020-12-07
107107
components: rustfmt, clippy
108108
override: true
109109

@@ -114,7 +114,7 @@ jobs:
114114
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
115115

116116
- name: Check the format
117-
run: cargo +nightly fmt --all -- --check
117+
run: cargo +nightly-2020-12-07 fmt --all -- --check
118118

119119
# type complexity must be ignored because we use huge templates for queries
120120
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions

crates/bevy_render/src/renderer/render_resource/render_resource_bindings.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ impl RenderResourceBinding {
3636
}
3737

3838
pub fn is_dynamic_buffer(&self) -> bool {
39-
matches!(self, RenderResourceBinding::Buffer {
40-
dynamic_index: Some(_),
41-
..
42-
})
39+
matches!(
40+
self,
41+
RenderResourceBinding::Buffer {
42+
dynamic_index: Some(_),
43+
..
44+
}
45+
)
4346
}
4447

4548
pub fn get_sampler(&self) -> Option<SamplerId> {
@@ -239,10 +242,13 @@ impl RenderResourceBindings {
239242
self.bindings
240243
.iter()
241244
.filter(|(_, binding)| {
242-
matches!(binding, RenderResourceBinding::Buffer {
243-
dynamic_index: Some(_),
244-
..
245-
})
245+
matches!(
246+
binding,
247+
RenderResourceBinding::Buffer {
248+
dynamic_index: Some(_),
249+
..
250+
}
251+
)
246252
})
247253
.map(|(name, _)| name.as_str())
248254
}

crates/bevy_winit/src/lib.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,15 @@ pub fn winit_runner(mut app: App) {
342342
}
343343
_ => {}
344344
},
345-
event::Event::DeviceEvent { ref event, .. } => {
346-
if let DeviceEvent::MouseMotion { delta } = event {
347-
let mut mouse_motion_events =
348-
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
349-
mouse_motion_events.send(MouseMotion {
350-
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
351-
});
352-
}
345+
event::Event::DeviceEvent {
346+
event: DeviceEvent::MouseMotion { delta },
347+
..
348+
} => {
349+
let mut mouse_motion_events =
350+
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
351+
mouse_motion_events.send(MouseMotion {
352+
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
353+
});
353354
}
354355
event::Event::MainEventsCleared => {
355356
handle_create_window_events(

0 commit comments

Comments
 (0)