Skip to content

Commit

Permalink
Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
notgull committed Jul 15, 2023
1 parent 84c032f commit ab3947a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion glutin-winit/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub trait GlWindow: HasWindowHandle + Sized {
/// use glutin_winit::GlWindow;
/// # use glutin::surface::{Surface, WindowSurface};
/// # let winit_window: winit::window::Window = unimplemented!();
/// # let (gl_surface, gl_context): (Surface<WindowSurface>, _) = unimplemented!();
/// # let (gl_surface, gl_context): (Surface<glutin::NoDisplay, WindowSurface<glutin::NoWindow>>, _) = unimplemented!();
///
/// winit_window.resize_surface(&gl_surface, &gl_context);
/// ```
Expand Down
4 changes: 2 additions & 2 deletions glutin/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ pub enum ColorBufferType {
/// ```no_run
/// fn test_send<T: Send>() {}
/// fn test_sync<T: Sync>() {}
/// test_send::<glutin::config::Config>();
/// test_sync::<glutin::config::Config>();
/// test_send::<glutin::config::Config<glutin::NoDisplay>>();
/// test_sync::<glutin::config::Config<glutin::NoDisplay>>();
/// ```
///
/// [`Surface`]: crate::surface::Surface
Expand Down
4 changes: 2 additions & 2 deletions glutin/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ pub enum ReleaseBehavior {
///
/// ```no_run
/// fn test_send<T: Send>() {}
/// test_send::<glutin::context::NotCurrentContext>();
/// test_send::<glutin::context::NotCurrentContext<glutin::NoDisplay>>();
/// ```
/// However it's not `Sync`.
/// ```compile_fail
/// fn test_sync<T: Sync>() {}
/// test_sync::<glutin::context::NotCurrentContext>();
/// test_sync::<glutin::context::NotCurrentContext<glutin::NoDisplay>>();
/// ```
#[derive(Debug)]
pub enum NotCurrentContext<D> {
Expand Down
4 changes: 2 additions & 2 deletions glutin/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ pub trait AsRawDisplay {
/// ```no_run
/// fn test_send<T: Send>() {}
/// fn test_sync<T: Sync>() {}
/// test_send::<glutin::display::Display>();
/// test_sync::<glutin::display::Display>();
/// test_send::<glutin::display::Display<glutin::NoDisplay>>();
/// test_sync::<glutin::display::Display<glutin::NoDisplay>>();
/// ```
#[derive(Debug)]
pub enum Display<D> {
Expand Down

0 comments on commit ab3947a

Please sign in to comment.