Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed May 8, 2024
1 parent 87572ba commit 0c54f9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ pub struct Context<D> {
context_impl: ContextDispatch<D>,

/// This is Send+Sync IFF D is Send+Sync.
_marker: PhantomData<Arc<D>>
_marker: PhantomData<Arc<D>>,
}

impl<D: HasDisplayHandle> Context<D> {
/// Creates a new instance of this struct, using the provided display.
pub fn new(display: D) -> Result<Self, SoftBufferError> {
match ContextDispatch::new(display) {
Ok(context_impl) => Ok(Self { context_impl, _marker: PhantomData }),
Ok(context_impl) => Ok(Self {
context_impl,
_marker: PhantomData,
}),
Err(InitError::Unsupported(display)) => {
let raw = display.display_handle()?.as_raw();
Err(SoftBufferError::UnsupportedDisplayPlatform {
Expand Down

0 comments on commit 0c54f9e

Please sign in to comment.