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
77d4ea9703
commit
3c86d49f5b
@ -231,7 +231,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
|
||||
|
@ -417,7 +417,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