mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use expect to document potential panic when starting a new frame recording, fix clippy warning
This commit is contained in:
parent
01aa6af1fd
commit
8db11cce37
@ -235,7 +235,7 @@ impl PlayState for CharSelectionState {
|
||||
fn render(&mut self, renderer: &mut Renderer, _: &Settings) {
|
||||
let mut drawer = match renderer
|
||||
.start_recording_frame(self.scene.global_bind_group())
|
||||
.unwrap()
|
||||
.expect("Unrecoverable render error when starting a new frame!")
|
||||
{
|
||||
Some(d) => d,
|
||||
// Couldn't get swap chain texture this fime
|
||||
|
@ -320,7 +320,7 @@ impl PlayState for MainMenuState {
|
||||
fn render(&mut self, renderer: &mut Renderer, _: &Settings) {
|
||||
let mut drawer = match renderer
|
||||
.start_recording_frame(self.scene.global_bind_group())
|
||||
.unwrap()
|
||||
.expect("Unrecoverable render error when starting a new frame!")
|
||||
{
|
||||
Some(d) => d,
|
||||
// Couldn't get swap chain texture this frame
|
||||
|
@ -1123,7 +1123,7 @@ impl<V: RectRasterableVol> Terrain<V> {
|
||||
renderer.update_texture(
|
||||
&col_lights.texture,
|
||||
atlas_offs.into_array(),
|
||||
tex_size.map(|e| u32::from(e)).into_array(),
|
||||
tex_size.map(u32::from).into_array(),
|
||||
&tex,
|
||||
);
|
||||
|
||||
|
@ -1394,7 +1394,7 @@ impl PlayState for SessionState {
|
||||
span!(_guard, "render", "<Session as PlayState>::render");
|
||||
let mut drawer = match renderer
|
||||
.start_recording_frame(self.scene.global_bind_group())
|
||||
.unwrap()
|
||||
.expect("Unrecoverable render error when starting a new frame!")
|
||||
{
|
||||
Some(d) => d,
|
||||
// Couldn't get swap chain texture this frame
|
||||
|
Loading…
Reference in New Issue
Block a user