Skip to content

Commit

Permalink
Fix configuration for undocumented_unsafe_blocks lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CBenoit committed Sep 29, 2023
1 parent c9d2f25 commit 21329b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
semicolon-outside-block-ignore-multiline = true
accept-comment-above-statement = true
accept-comment-above-attributes = true
5 changes: 3 additions & 2 deletions crates/ironrdp-cliprdr-native/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ impl WinClipboard {

// We need to receive winapi messages in the main thread, so we need to add a subclass to
// the window.
//
// SAFETY: `window` is a valid window handle, `clipboard_subproc` is in the static memory,
// `ctx` is valid and its ownership is transferred to the subclass via `into_raw`.
let winapi_result = unsafe {
// SAFETY: `window` is a valid window handle, `clipboard_subproc` is in the static memory,
// `ctx` is valid and its ownership is transferred to the subclass via `into_raw`.
SetWindowSubclass(window, Some(clipboard_subproc), 0, Box::into_raw(ctx) as usize)
};

Expand Down

0 comments on commit 21329b6

Please sign in to comment.