mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Enable the clippy::pedantic lint group (#8429)
Instead of opting in to pedantic lints one by one, enable the whole group and opt out of the noisy ones. 64% of the pedantic lints were already listed individually. This deletes 90 explicit lint lines, enables 51 pedantic lints we never listed, and picks up new pedantic lints for free. Each opt-out carries its hit count, so the cost of turning one back on is visible. `restriction` and `nursery` stay opt-in per lint. Stacked on top of #8430, which fixes the one real bug the new lints found. * [x] I have followed the instructions in the PR template --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -161,16 +161,16 @@ fn set_app_icon_windows(icon_data: &IconData) -> AppIconStatus {
|
||||
if icon_big.is_null() {
|
||||
log::warn!("Failed to create HICON (for big icon) from embedded png data.");
|
||||
return AppIconStatus::NotSetIgnored; // We could try independently with the small icon but what's the point, it would look bad!
|
||||
} else {
|
||||
// SAFETY: Unsafe WinApi function, takes objects previously created with WinAPI, all checked for null prior.
|
||||
unsafe {
|
||||
SendMessageW(
|
||||
window_handle,
|
||||
WM_SETICON,
|
||||
ICON_BIG as usize,
|
||||
icon_big as isize,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// SAFETY: Unsafe WinApi function, takes objects previously created with WinAPI, all checked for null prior.
|
||||
unsafe {
|
||||
SendMessageW(
|
||||
window_handle,
|
||||
WM_SETICON,
|
||||
ICON_BIG as usize,
|
||||
icon_big as isize,
|
||||
);
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -180,16 +180,16 @@ fn set_app_icon_windows(icon_data: &IconData) -> AppIconStatus {
|
||||
if icon_small.is_null() {
|
||||
log::warn!("Failed to create HICON (for small icon) from embedded png data.");
|
||||
return AppIconStatus::NotSetIgnored;
|
||||
} else {
|
||||
// SAFETY: Unsafe WinApi function, takes objects previously created with WinAPI, all checked for null prior.
|
||||
unsafe {
|
||||
SendMessageW(
|
||||
window_handle,
|
||||
WM_SETICON,
|
||||
ICON_SMALL as usize,
|
||||
icon_small as isize,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// SAFETY: Unsafe WinApi function, takes objects previously created with WinAPI, all checked for null prior.
|
||||
unsafe {
|
||||
SendMessageW(
|
||||
window_handle,
|
||||
WM_SETICON,
|
||||
ICON_SMALL as usize,
|
||||
icon_small as isize,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ fn roaming_appdata() -> Option<PathBuf> {
|
||||
&FOLDERID_RoamingAppData,
|
||||
KF_FLAG_DONT_VERIFY as u32,
|
||||
core::ptr::null_mut(),
|
||||
&mut path_raw,
|
||||
&raw mut path_raw,
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user