File tree Expand file tree Collapse file tree 3 files changed +25
-18
lines changed
bevy_render/src/renderer/render_resource Expand file tree Collapse file tree 3 files changed +25
-18
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments