parent
1398d78330
commit
a3bca7e464
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -103,7 +103,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly-2020-12-07
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ jobs:
|
|||||||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
|
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev
|
||||||
|
|
||||||
- name: Check the format
|
- 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
|
# 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
|
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions
|
||||||
|
|||||||
@ -36,10 +36,13 @@ impl RenderResourceBinding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_dynamic_buffer(&self) -> bool {
|
pub fn is_dynamic_buffer(&self) -> bool {
|
||||||
matches!(self, RenderResourceBinding::Buffer {
|
matches!(
|
||||||
|
self,
|
||||||
|
RenderResourceBinding::Buffer {
|
||||||
dynamic_index: Some(_),
|
dynamic_index: Some(_),
|
||||||
..
|
..
|
||||||
})
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_sampler(&self) -> Option<SamplerId> {
|
pub fn get_sampler(&self) -> Option<SamplerId> {
|
||||||
@ -239,10 +242,13 @@ impl RenderResourceBindings {
|
|||||||
self.bindings
|
self.bindings
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|(_, binding)| {
|
.filter(|(_, binding)| {
|
||||||
matches!(binding, RenderResourceBinding::Buffer {
|
matches!(
|
||||||
|
binding,
|
||||||
|
RenderResourceBinding::Buffer {
|
||||||
dynamic_index: Some(_),
|
dynamic_index: Some(_),
|
||||||
..
|
..
|
||||||
})
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.map(|(name, _)| name.as_str())
|
.map(|(name, _)| name.as_str())
|
||||||
}
|
}
|
||||||
|
|||||||
@ -342,15 +342,16 @@ pub fn winit_runner(mut app: App) {
|
|||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
event::Event::DeviceEvent { ref event, .. } => {
|
event::Event::DeviceEvent {
|
||||||
if let DeviceEvent::MouseMotion { delta } = event {
|
event: DeviceEvent::MouseMotion { delta },
|
||||||
|
..
|
||||||
|
} => {
|
||||||
let mut mouse_motion_events =
|
let mut mouse_motion_events =
|
||||||
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
|
app.resources.get_mut::<Events<MouseMotion>>().unwrap();
|
||||||
mouse_motion_events.send(MouseMotion {
|
mouse_motion_events.send(MouseMotion {
|
||||||
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
|
delta: Vec2::new(delta.0 as f32, delta.1 as f32),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
event::Event::MainEventsCleared => {
|
event::Event::MainEventsCleared => {
|
||||||
handle_create_window_events(
|
handle_create_window_events(
|
||||||
&mut app.resources,
|
&mut app.resources,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user