Use HasDisplayHandle instead of deprecated HasRawDisplayHandle

Currently `connect` is unsafe because it doesn't take ownership of the
display or have a lifetime bound.
This commit is contained in:
Ian Douglas Scott 2024-01-16 21:28:25 -08:00
parent bf49c91331
commit 869737dadc
11 changed files with 24 additions and 22 deletions

View file

@ -1,9 +1,9 @@
use crate::ClipboardProvider;
use raw_window_handle::HasRawDisplayHandle;
use raw_window_handle::HasDisplayHandle;
use std::error::Error;
pub fn connect<W: HasRawDisplayHandle>(
pub fn connect<W: HasDisplayHandle>(
_window: &W,
) -> Result<Box<dyn ClipboardProvider>, Box<dyn Error>> {
Ok(Box::new(Clipboard::new()?))