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

Commit

Permalink
Fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Aug 14, 2022
1 parent f8e10c8 commit e2ce2a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gdkwayland/src/wayland_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl WaylandWindow {
unsafe extern "C" fn destroy_notify<P: Fn(&WaylandWindow, &str) + 'static>(
data: glib::ffi::gpointer,
) {
Box::from_raw(data as *mut _);
let _ = Box::from_raw(data as *mut _);
}
unsafe {
from_glib(ffi::gdk_wayland_window_export_handle(
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Clipboard {
_clipboard: *mut ffi::GtkClipboard,
user_data: gpointer,
) {
Box_::<F>::from_raw(user_data as *mut _);
let _ = Box_::<F>::from_raw(user_data as *mut _);
}
let stashed_targets: Vec<_> = targets.iter().map(|e| e.to_glib_none()).collect();
let mut t = Vec::with_capacity(stashed_targets.len());
Expand Down Expand Up @@ -61,7 +61,7 @@ impl Clipboard {
if !success {
// Cleanup function is not called in case of a failure.
unsafe {
Box_::<F>::from_raw(user_data as *mut _);
let _ = Box_::<F>::from_raw(user_data as *mut _);
}
}
success
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/tree_sortable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<O: IsA<TreeSortable>> TreeSortableExtManual for O {
>(
ptr: gpointer,
) {
Box::<F>::from_raw(ptr as *mut _);
let _ = Box::<F>::from_raw(ptr as *mut _);
}
unsafe {
ffi::gtk_tree_sortable_set_default_sort_func(
Expand Down Expand Up @@ -187,7 +187,7 @@ impl<O: IsA<TreeSortable>> TreeSortableExtManual for O {
>(
ptr: gpointer,
) {
Box::<F>::from_raw(ptr as *mut _);
let _ = Box::<F>::from_raw(ptr as *mut _);
}
unsafe {
ffi::gtk_tree_sortable_set_sort_func(
Expand Down

0 comments on commit e2ce2a8

Please sign in to comment.