Skip to content

Fix nightly clippy warnings #1730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 120 additions & 123 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ glow = { version = "0.13.0", optional = true }
epoxy = { version = "0.1.0", optional = true }
libloading = { version = "0.8.0", optional = true }
im-rc = { version = "15", optional = true }
async-channel = { version = "2.2.1", optional = true }
async-channel = { version = "2.3", optional = true }
tokio = { version = "1", features = ["full"], optional = true }
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false, optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
Expand Down
1 change: 1 addition & 0 deletions examples/virtual_methods/base_button/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub trait BaseButtonExt: IsA<BaseButton> {
///
/// This retrieves this instance's class and calls the function pointer in
/// it.
#[allow(dead_code)]
fn sync_method(&self, extra_text: Option<&str>) {
let obj = self.upcast_ref::<BaseButton>();
(obj.class().as_ref().sync_method)(obj, extra_text);
Expand Down
4 changes: 2 additions & 2 deletions gdk4-wayland/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
4 changes: 2 additions & 2 deletions gdk4-wayland/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
4 changes: 2 additions & 2 deletions gdk4-win32/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
4 changes: 2 additions & 2 deletions gdk4-win32/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
4 changes: 2 additions & 2 deletions gdk4-x11/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-x11/src/auto/x11_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl X11Screen {
connect_raw(
self.as_ptr() as *mut _,
b"window-manager-changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
window_manager_changed_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl X11Display {
connect_raw(
self.as_ptr() as *mut _,
b"xevent\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
Some(transmute::<*const (), unsafe extern "C" fn()>(
xevent_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand Down
4 changes: 2 additions & 2 deletions gdk4-x11/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
8 changes: 4 additions & 4 deletions gdk4/src/auto/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl Clipboard {
connect_raw(
self.as_ptr() as *mut _,
b"changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
changed_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -363,7 +363,7 @@ impl Clipboard {
connect_raw(
self.as_ptr() as *mut _,
b"notify::content\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_content_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -386,7 +386,7 @@ impl Clipboard {
connect_raw(
self.as_ptr() as *mut _,
b"notify::formats\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_formats_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -409,7 +409,7 @@ impl Clipboard {
connect_raw(
self.as_ptr() as *mut _,
b"notify::local\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_local_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand Down
6 changes: 3 additions & 3 deletions gdk4/src/auto/content_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub trait ContentProviderExt: IsA<ContentProvider> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"content-changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
content_changed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -213,7 +213,7 @@ pub trait ContentProviderExt: IsA<ContentProvider> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::formats\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_formats_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -239,7 +239,7 @@ pub trait ContentProviderExt: IsA<ContentProvider> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::storable-formats\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_storable_formats_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down
22 changes: 11 additions & 11 deletions gdk4/src/auto/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
changed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down Expand Up @@ -240,7 +240,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"tool-changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
tool_changed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -266,7 +266,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::caps-lock-state\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_caps_lock_state_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -289,7 +289,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::direction\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_direction_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -315,7 +315,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::has-bidi-layouts\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_has_bidi_layouts_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -341,7 +341,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::modifier-state\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_modifier_state_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -364,7 +364,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::n-axes\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_n_axes_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -390,7 +390,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::num-lock-state\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_num_lock_state_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -416,7 +416,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::scroll-lock-state\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_scroll_lock_state_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -439,7 +439,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::seat\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_seat_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -462,7 +462,7 @@ pub trait DeviceExt: IsA<Device> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::tool\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_tool_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down
20 changes: 10 additions & 10 deletions gdk4/src/auto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"closed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
closed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -335,7 +335,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"opened\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
opened_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -361,7 +361,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"seat-added\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
seat_added_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down Expand Up @@ -390,7 +390,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"seat-removed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
seat_removed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down Expand Up @@ -419,7 +419,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"setting-changed\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
setting_changed_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -442,7 +442,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::composited\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_composited_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down Expand Up @@ -470,7 +470,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::dmabuf-formats\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_dmabuf_formats_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -496,7 +496,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::input-shapes\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_input_shapes_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -519,7 +519,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::rgba\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_rgba_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down Expand Up @@ -547,7 +547,7 @@ pub trait DisplayExt: IsA<Display> + sealed::Sealed + 'static {
connect_raw(
self.as_ptr() as *mut _,
b"notify::shadow-width\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_shadow_width_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
Expand Down
4 changes: 2 additions & 2 deletions gdk4/src/auto/display_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl DisplayManager {
connect_raw(
self.as_ptr() as *mut _,
b"display-opened\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
display_opened_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand All @@ -108,7 +108,7 @@ impl DisplayManager {
connect_raw(
self.as_ptr() as *mut _,
b"notify::default-display\0".as_ptr() as *const _,
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_default_display_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
Expand Down
Loading
Loading