Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit e2ce2a8

Browse files
Fix new clippy warnings
1 parent f8e10c8 commit e2ce2a8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

gdkwayland/src/wayland_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl WaylandWindow {
5050
unsafe extern "C" fn destroy_notify<P: Fn(&WaylandWindow, &str) + 'static>(
5151
data: glib::ffi::gpointer,
5252
) {
53-
Box::from_raw(data as *mut _);
53+
let _ = Box::from_raw(data as *mut _);
5454
}
5555
unsafe {
5656
from_glib(ffi::gdk_wayland_window_export_handle(

gtk/src/clipboard.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Clipboard {
3232
_clipboard: *mut ffi::GtkClipboard,
3333
user_data: gpointer,
3434
) {
35-
Box_::<F>::from_raw(user_data as *mut _);
35+
let _ = Box_::<F>::from_raw(user_data as *mut _);
3636
}
3737
let stashed_targets: Vec<_> = targets.iter().map(|e| e.to_glib_none()).collect();
3838
let mut t = Vec::with_capacity(stashed_targets.len());
@@ -61,7 +61,7 @@ impl Clipboard {
6161
if !success {
6262
// Cleanup function is not called in case of a failure.
6363
unsafe {
64-
Box_::<F>::from_raw(user_data as *mut _);
64+
let _ = Box_::<F>::from_raw(user_data as *mut _);
6565
}
6666
}
6767
success

gtk/src/tree_sortable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<O: IsA<TreeSortable>> TreeSortableExtManual for O {
131131
>(
132132
ptr: gpointer,
133133
) {
134-
Box::<F>::from_raw(ptr as *mut _);
134+
let _ = Box::<F>::from_raw(ptr as *mut _);
135135
}
136136
unsafe {
137137
ffi::gtk_tree_sortable_set_default_sort_func(
@@ -187,7 +187,7 @@ impl<O: IsA<TreeSortable>> TreeSortableExtManual for O {
187187
>(
188188
ptr: gpointer,
189189
) {
190-
Box::<F>::from_raw(ptr as *mut _);
190+
let _ = Box::<F>::from_raw(ptr as *mut _);
191191
}
192192
unsafe {
193193
ffi::gtk_tree_sortable_set_sort_func(

0 commit comments

Comments
 (0)