We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My code can not be formatted by the command cargo fmt
cargo fmt
An example of code is below
event_loop .run(move |event, control_flow| { match event { Event::DeviceEvent { event: DeviceEvent::MouseMotion{ delta, }, .. } => if state.mouse_pressed { state.camera_controller.process_mouse(delta.0, delta.1) } Event::WindowEvent { ref event, window_id, } if window_id == state.window().id() => { if !state.input(event) { match event { WindowEvent::CloseRequested | WindowEvent::KeyboardInput { event: KeyEvent { state: ElementState::Pressed, physical_key: PhysicalKey::Code(KeyCode::Escape), .. }, .. } => control_flow.exit(), WindowEvent::Resized(physical_size) => { state.resize(*physical_size); } // The codes below are unformattable WindowEvent::RedrawRequested => { state.window().request_redraw(); let now = instant::Instant::now(); let dt = now - last_render_time; last_render_time = now; state.update(dt); match state.render() { Ok(_) => {} Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => state.resize(state.size), Err(wgpu::SurfaceError::OutOfMemory) => control_flow.exit(), Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), } } _ => {} } } } _ => {} } }) .unwrap();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My code can not be formatted by the command
cargo fmt
An example of code is below
The text was updated successfully, but these errors were encountered: