Skip to content

Commit

Permalink
squelch ffi safety warning when building examples (false positive? bu…
Browse files Browse the repository at this point in the history
…t `Option` doesn't hurt here...)
  • Loading branch information
MaulingMonkey committed Oct 18, 2024
1 parent 9aa20a5 commit 3745cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/natvis-verifying-playground.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use hwnd0::*;

fn main() {
#[link(name = "user32")] extern "C" { fn GetDesktopWindow() -> Result<NonNullHWND, ()>; }
#[link(name = "user32")] extern "C" { fn GetDesktopWindow() -> Option<NonNullHWND>; }
let desktop = unsafe { GetDesktopWindow() }.unwrap();

let a = [
Expand Down

0 comments on commit 3745cc6

Please sign in to comment.