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:
parent
bf49c91331
commit
869737dadc
11 changed files with 24 additions and 22 deletions
|
|
@ -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()?))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue