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

@ -14,7 +14,7 @@ fn main() {
.unwrap();
let mut clipboard =
Clipboard::connect(&window).expect("Connect to clipboard");
unsafe { Clipboard::connect(&window) }.expect("Connect to clipboard");
clipboard
.write(String::from("Hello, world!"))