Skip to content

Commit 6eadb86

Browse files
wusyongGae24
authored andcommitted
webrender_traits: update closure in with_front_buffer to FnOnce (servo#32946)
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
1 parent 1123ed8 commit 6eadb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/shared/webrender/rendering_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl RenderingContext {
169169

170170
/// Invoke a closure with the surface associated with the current front buffer.
171171
/// This can be used to create a surfman::SurfaceTexture to blit elsewhere.
172-
pub fn with_front_buffer<F: FnMut(&Device, Surface) -> Surface>(&self, mut f: F) {
172+
pub fn with_front_buffer<F: FnOnce(&Device, Surface) -> Surface>(&self, f: F) {
173173
let device = &mut self.0.device.borrow_mut();
174174
let context = &mut self.0.context.borrow_mut();
175175
let surface = device

0 commit comments

Comments
 (0)