Skip to content

Commit

Permalink
Fix RenderResources index slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajbouw committed Nov 29, 2020
1 parent 1f3d506 commit 343356a
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[index]
}

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

0 comments on commit 343356a

Please sign in to comment.