Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Dec 10, 2024
1 parent e533055 commit 4c10299
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl X11Display {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"xevent\0".as_ptr() as *const _,
c"xevent".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
xevent_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/drag_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub trait DragSurfaceExtManual: IsA<DragSurface> {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"compute-size\0".as_ptr() as *const _,
c"compute-size".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
compute_size_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/toplevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait ToplevelExtManual: IsA<Toplevel> {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"compute-size\0".as_ptr() as *const _,
c"compute-size".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
compute_size_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/drop_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl DropTarget {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"drop\0".as_ptr() as *const _,
c"drop".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
drop_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/editable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub trait EditableExtManual: IsA<Editable> + 'static {
let f: Box<F> = Box::new(f);
connect_raw(
self.to_glib_none().0 as *mut _,
b"insert-text\0".as_ptr() as *mut _,
c"insert-text".as_ptr() as *mut _,
Some(transmute::<usize, unsafe extern "C" fn()>(
insert_text_trampoline::<Self, F> as usize,
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/editable_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl EditableLabel {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::editing\0".as_ptr() as *const _,
c"notify::editing".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
notify_editing_trampoline::<F> as *const (),
)),
Expand Down
4 changes: 2 additions & 2 deletions gtk4/src/event_controller_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl EventControllerKey {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"key-pressed\0".as_ptr() as *const _,
c"key-pressed".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
key_pressed_trampoline::<F> as *const (),
)),
Expand Down Expand Up @@ -72,7 +72,7 @@ impl EventControllerKey {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"key-released\0".as_ptr() as *const _,
c"key-released".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
key_released_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/message_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl MessageDialog {
flags.into_glib(),
type_.into_glib(),
buttons.into_glib(),
b"%s\0".as_ptr() as *const libc::c_char,
c"%s".as_ptr() as *const libc::c_char,
message.as_ptr(),
ptr::null::<libc::c_char>(),
))
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl Overlay {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"get-child-position\0".as_ptr() as *mut _,
c"get-child-position".as_ptr() as *mut _,
Some(transmute::<usize, unsafe extern "C" fn()>(
get_child_position_trampoline::<F> as usize,
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/shortcuts_section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl ShortcutsSection {
let f = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"change-current-page\0".as_ptr() as *const _,
c"change-current-page".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
change_current_page_trampoline::<F> as usize,
)),
Expand Down
8 changes: 4 additions & 4 deletions gtk4/src/signal_list_item_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl SignalListItemFactory {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"bind\0".as_ptr() as *const _,
c"bind".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
bind_trampoline::<F> as *const (),
)),
Expand All @@ -55,7 +55,7 @@ impl SignalListItemFactory {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"setup\0".as_ptr() as *const _,
c"setup".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
setup_trampoline::<F> as *const (),
)),
Expand All @@ -81,7 +81,7 @@ impl SignalListItemFactory {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"teardown\0".as_ptr() as *const _,
c"teardown".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
teardown_trampoline::<F> as *const (),
)),
Expand All @@ -107,7 +107,7 @@ impl SignalListItemFactory {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"unbind\0".as_ptr() as *const _,
c"unbind".as_ptr() as *const _,
Some(transmute::<*const (), unsafe extern "C" fn()>(
unbind_trampoline::<F> as *const (),
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/spin_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl SpinButton {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"input\0".as_ptr() as *mut _,
c"input".as_ptr() as *mut _,
Some(transmute::<usize, unsafe extern "C" fn()>(
input_trampoline::<F> as usize,
)),
Expand Down
24 changes: 12 additions & 12 deletions gtk4/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"activate\0".as_ptr() as *const _,
c"activate".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
activate_trampoline::<F> as usize,
)),
Expand All @@ -44,7 +44,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"backspace\0".as_ptr() as *const _,
c"backspace".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
backspace_trampoline::<F> as usize,
)),
Expand All @@ -65,7 +65,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"copy-clipboard\0".as_ptr() as *const _,
c"copy-clipboard".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
copy_clipboard_trampoline::<F> as usize,
)),
Expand All @@ -86,7 +86,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"cut-clipboard\0".as_ptr() as *const _,
c"cut-clipboard".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
cut_clipboard_trampoline::<F> as usize,
)),
Expand Down Expand Up @@ -114,7 +114,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"delete-from-cursor\0".as_ptr() as *const _,
c"delete-from-cursor".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
delete_from_cursor_trampoline::<F> as usize,
)),
Expand All @@ -136,7 +136,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"insert-at-cursor\0".as_ptr() as *const _,
c"insert-at-cursor".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
insert_at_cursor_trampoline::<F> as usize,
)),
Expand All @@ -157,7 +157,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"insert-emoji\0".as_ptr() as *const _,
c"insert-emoji".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
insert_emoji_trampoline::<F> as usize,
)),
Expand Down Expand Up @@ -191,7 +191,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"move-cursor\0".as_ptr() as *const _,
c"move-cursor".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
move_cursor_trampoline::<F> as usize,
)),
Expand All @@ -212,7 +212,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"paste-clipboard\0".as_ptr() as *const _,
c"paste-clipboard".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
paste_clipboard_trampoline::<F> as usize,
)),
Expand All @@ -234,7 +234,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"populate-popup\0".as_ptr() as *const _,
c"populate-popup".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
populate_popup_trampoline::<F> as usize,
)),
Expand All @@ -256,7 +256,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"preedit-changed\0".as_ptr() as *const _,
c"preedit-changed".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
preedit_changed_trampoline::<F> as usize,
)),
Expand All @@ -277,7 +277,7 @@ impl Text {
let f: Box<F> = Box::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"toggle-overwrite\0".as_ptr() as *const _,
c"toggle-overwrite".as_ptr() as *const _,
Some(transmute::<usize, unsafe extern "C" fn()>(
toggle_overwrite_trampoline::<F> as usize,
)),
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/text_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub trait TextBufferExtManual: IsA<TextBuffer> + 'static {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.to_glib_none().0 as *mut _,
b"insert-text\0".as_ptr() as *mut _,
c"insert-text".as_ptr() as *mut _,
Some(transmute::<usize, unsafe extern "C" fn()>(
insert_text_trampoline::<Self, F> as usize,
)),
Expand Down

0 comments on commit 4c10299

Please sign in to comment.