Skip to content

Commit

Permalink
doc comment improvement, remove unnecessary lifetime constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Sep 23, 2024
1 parent 1491a8a commit 5231e3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/egui-wgpu/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ pub trait CallbackTrait: Send + Sync {
///
/// It is given access to the [`wgpu::RenderPass`] so that it can issue draw commands
/// into the same [`wgpu::RenderPass`] that is used for all other egui elements.
fn paint<'a>(
&'a self,
fn paint(
&self,
info: PaintCallbackInfo,
render_pass: &mut wgpu::RenderPass<'static>,
callback_resources: &'a CallbackResources,
callback_resources: &CallbackResources,
);
}

Expand Down Expand Up @@ -409,7 +409,7 @@ impl Renderer {

/// Executes the egui renderer onto an existing wgpu renderpass.
///
/// Note that the lifetime of `render_pass` is `'static` which requires a call to `wgpu::RenderPass::forget_lifetime`.
/// Note that the lifetime of `render_pass` is `'static` which requires a call to [`wgpu::RenderPass::forget_lifetime`].
/// This allows users to pass resources that live outside of the callback resources to the render pass.
/// The render pass internally keeps all referenced resources alive as long as necessary.
/// The only consequence of `forget_lifetime` is that any operation on the parent encoder will cause a runtime error
Expand Down

0 comments on commit 5231e3c

Please sign in to comment.