Skip to content

Commit

Permalink
Fix failing doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
notgull committed Jul 30, 2023
1 parent 592c1c7 commit ae74227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ surface.on_draw(move || async move {

// If you don't have any other windows to draw, make sure the windows are
// presented.
display.present().await.expect("failed to present");
display.present().await;
});
```

Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
//! # unimplemented!()
//! # }
//! # }
//! # #[derive(Copy, Clone)]
//! # struct Window;
//! # unsafe impl raw_window_handle::HasRawWindowHandle for Window {
//! # fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
Expand All @@ -60,7 +61,7 @@
//! # impl Window {
//! # fn width(&self) -> u32 { 0 }
//! # fn height(&self) -> u32 { 0 }
//! # fn on_draw(&self, f: impl FnOnce()) { f() }
//! # fn on_draw<R>(&self, f: impl FnOnce() -> R) { f(); }
//! # }
//! # let my_display = MyDisplay;
//! # let window = Window;
Expand Down Expand Up @@ -108,7 +109,8 @@
//! ctx.finish().expect("failed to finish drawing");
//!
//! // Present the display.
//! display.present().await.expect("failed to present display");
//! drop(ctx);
//! display.present().await;
//! });
//! # });
//! ```
Expand Down

0 comments on commit ae74227

Please sign in to comment.