mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
refactor: add unnecessary_safety_comment clippy safety lint
This commit is contained in:
committed by
Benoît Cortier
parent
c6d606e670
commit
dc5da26fb9
@@ -74,6 +74,7 @@ unit_bindings = "warn"
|
||||
|
||||
# == Safer unsafe == #
|
||||
undocumented_unsafe_blocks = "warn"
|
||||
unnecessary_safety_comment = "warn"
|
||||
multiple_unsafe_ops_per_block = "warn"
|
||||
transmute_ptr_to_ptr = "warn"
|
||||
as_ptr_cast_mut = "warn"
|
||||
|
||||
@@ -304,7 +304,9 @@ fn filter_format_ids(formats: &mut HashSet<ClipboardFormatId>) {
|
||||
|
||||
/// WinAPI event loop for clipboard processing
|
||||
///
|
||||
/// SAFETY: This function should only be used for windows subclassing api via `SetWindowSubclass`.
|
||||
/// # Safety
|
||||
///
|
||||
/// This function should only be used for windows subclassing api via `SetWindowSubclass`.
|
||||
pub(crate) unsafe extern "system" fn clipboard_subproc(
|
||||
hwnd: HWND,
|
||||
msg: u32,
|
||||
|
||||
@@ -52,7 +52,9 @@ impl Drop for GlobalMemoryBuffer {
|
||||
|
||||
/// Render data format into the clipboard.
|
||||
///
|
||||
/// SAFETY: This function should only be called in the context of processing
|
||||
/// # Safety
|
||||
///
|
||||
/// This function should only be called in the context of processing
|
||||
/// `WM_RENDERFORMAT` or `WM_RENDERALLFORMATS` messages inside WinAPI message loop.
|
||||
pub(crate) unsafe fn render_format(format: ClipboardFormatId, data: &[u8]) -> WinCliprdrResult<()> {
|
||||
// Allocate buffer and copy data into it
|
||||
|
||||
Reference in New Issue
Block a user