Skip to content

Commit

Permalink
Remove unnecessary swap texture clone (mvlabat#85)
Browse files Browse the repository at this point in the history
* Remove unnecessary swap texture clone.

* Fix linters

Co-authored-by: mvlabat <mvlabat@gmail.com>
  • Loading branch information
2 people authored and HackerFoo committed Jul 16, 2022
1 parent 6f5570e commit 0369ca7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/egui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,15 @@ impl Node for EguiNode {

let extracted_window =
&world.get_resource::<ExtractedWindows>().unwrap().windows[&self.window_id];
let swap_chain_texture = extracted_window
.swap_chain_texture
.as_ref()
.unwrap()
.clone();
let swap_chain_texture = extracted_window.swap_chain_texture.as_ref().unwrap();

let mut render_pass =
render_context
.command_encoder
.begin_render_pass(&RenderPassDescriptor {
label: Some("egui render pass"),
color_attachments: &[RenderPassColorAttachment {
view: &swap_chain_texture,
view: swap_chain_texture,
resolve_target: None,
ops: Operations {
load: LoadOp::Load,
Expand Down

0 comments on commit 0369ca7

Please sign in to comment.