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
|
|
@ -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!"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue