Skip to content

Commit

Permalink
Reformat on Rust 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Nov 29, 2024
1 parent 6d65b5b commit 7b68270
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/backends/cg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ impl<D, W> Drop for CGImpl<D, W> {

impl<D: HasDisplayHandle, W: HasWindowHandle> SurfaceInterface<D, W> for CGImpl<D, W> {
type Context = D;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

fn new(window_src: W, _display: &D) -> Result<Self, InitError<W>> {
// `NSView`/`UIView` can only be accessed from the main thread.
Expand Down
5 changes: 4 additions & 1 deletion src/backends/kms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ struct SharedBuffer {

impl<D: HasDisplayHandle + ?Sized, W: HasWindowHandle> SurfaceInterface<D, W> for KmsImpl<D, W> {
type Context = Arc<KmsDisplayImpl<D>>;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

/// Create a new KMS backend.
fn new(window: W, display: &Arc<KmsDisplayImpl<D>>) -> Result<Self, InitError<W>> {
Expand Down
5 changes: 4 additions & 1 deletion src/backends/orbital.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> OrbitalImpl<D, W> {

impl<D: HasDisplayHandle, W: HasWindowHandle> SurfaceInterface<D, W> for OrbitalImpl<D, W> {
type Context = D;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

fn new(window: W, _display: &D) -> Result<Self, InitError<W>> {
let raw = window.window_handle()?.as_raw();
Expand Down
5 changes: 4 additions & 1 deletion src/backends/wayland/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ impl<D: HasDisplayHandle + ?Sized, W: HasWindowHandle> SurfaceInterface<D, W>
for WaylandImpl<D, W>
{
type Context = Arc<WaylandDisplayImpl<D>>;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

fn new(window: W, display: &Arc<WaylandDisplayImpl<D>>) -> Result<Self, InitError<W>> {
// Get the raw Wayland window.
Expand Down
5 changes: 4 additions & 1 deletion src/backends/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> WebImpl<D, W> {

impl<D: HasDisplayHandle, W: HasWindowHandle> SurfaceInterface<D, W> for WebImpl<D, W> {
type Context = WebDisplayImpl<D>;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

fn new(window: W, display: &WebDisplayImpl<D>) -> Result<Self, InitError<W>> {
let raw = window.window_handle()?.as_raw();
Expand Down
5 changes: 4 additions & 1 deletion src/backends/win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> Win32Impl<D, W> {

impl<D: HasDisplayHandle, W: HasWindowHandle> SurfaceInterface<D, W> for Win32Impl<D, W> {
type Context = D;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

/// Create a new `Win32Impl` from a `Win32WindowHandle`.
fn new(window: W, _display: &D) -> Result<Self, crate::error::InitError<W>> {
Expand Down
5 changes: 4 additions & 1 deletion src/backends/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ struct ShmBuffer {

impl<D: HasDisplayHandle + ?Sized, W: HasWindowHandle> SurfaceInterface<D, W> for X11Impl<D, W> {
type Context = Arc<X11DisplayImpl<D>>;
type Buffer<'a> = BufferImpl<'a, D, W> where Self: 'a;
type Buffer<'a>
= BufferImpl<'a, D, W>
where
Self: 'a;

/// Create a new `X11Impl` from a `HasWindowHandle`.
fn new(window_src: W, display: &Arc<X11DisplayImpl<D>>) -> Result<Self, InitError<W>> {
Expand Down

0 comments on commit 7b68270

Please sign in to comment.