Skip to content

Commit

Permalink
Fix ci (#1024)
Browse files Browse the repository at this point in the history
* fix format

* fix clippy

* used fixed nightly
  • Loading branch information
mockersf authored Dec 7, 2020
1 parent 1398d78 commit a3bca7e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2020-12-07
components: rustfmt, clippy
override: true

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

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

# type complexity must be ignored because we use huge templates for queries
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ impl RenderResourceBinding {
}

pub fn is_dynamic_buffer(&self) -> bool {
matches!(self, RenderResourceBinding::Buffer {
dynamic_index: Some(_),
..
})
matches!(
self,
RenderResourceBinding::Buffer {
dynamic_index: Some(_),
..
}
)
}

pub fn get_sampler(&self) -> Option<SamplerId> {
Expand Down Expand Up @@ -239,10 +242,13 @@ impl RenderResourceBindings {
self.bindings
.iter()
.filter(|(_, binding)| {
matches!(binding, RenderResourceBinding::Buffer {
dynamic_index: Some(_),
..
})
matches!(
binding,
RenderResourceBinding::Buffer {
dynamic_index: Some(_),
..
}
)
})
.map(|(name, _)| name.as_str())
}
Expand Down
17 changes: 9 additions & 8 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,15 @@ pub fn winit_runner(mut app: App) {
}
_ => {}
},
event::Event::DeviceEvent { ref event, .. } => {
if let DeviceEvent::MouseMotion { delta } = event {
let mut mouse_motion_events =
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
mouse_motion_events.send(MouseMotion {
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
});
}
event::Event::DeviceEvent {
event: DeviceEvent::MouseMotion { delta },
..
} => {
let mut mouse_motion_events =
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
mouse_motion_events.send(MouseMotion {
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
});
}
event::Event::MainEventsCleared => {
handle_create_window_events(
Expand Down

0 comments on commit a3bca7e

Please sign in to comment.