Skip to content

Commit

Permalink
Fix RenderResources index slicing (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajbouw authored Nov 30, 2020
1 parent d9c428e commit c7b9ad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_derive/src/render_resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ pub fn derive_render_resources(input: TokenStream) -> TokenStream {
}

fn get_render_resource_name(&self, index: usize) -> Option<&str> {
Some(#render_resource_names_ident[index])
#render_resource_names_ident.get(index).copied()
}

fn get_render_resource_hints(&self, index: usize) -> Option<#bevy_render_path::renderer::RenderResourceHints> {
#render_resource_hints_ident[index].clone()
#render_resource_hints_ident.get(index).and_then(|o| *o)
}

fn iter(&self) -> #bevy_render_path::renderer::RenderResourceIterator {
Expand Down

0 comments on commit c7b9ad5

Please sign in to comment.