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

Commit 4452940

Browse files
sdroegepbor
authored andcommitted
gdkwayland: Fix new clippy warning
``` error: this expression creates a reference which is immediately dereferenced by the compiler --> gdkwayland/src/wayland_window.rs:48:34 | 48 | (*callback)(&window, &handle.as_str()); | ^^^^^^^^^^^^^^^^ help: change this to: `handle.as_str()` | = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow ```
1 parent 1cd71ae commit 4452940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdkwayland/src/wayland_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl WaylandWindow {
4949
let window = from_glib_borrow(window);
5050
let handle: Borrowed<glib::GString> = from_glib_borrow(handle);
5151
let callback: &P = &*(user_data as *mut _);
52-
(*callback)(&window, &handle.as_str());
52+
(*callback)(&window, handle.as_str());
5353
}
5454
unsafe extern "C" fn destroy_notify<P: Fn(&WaylandWindow, &str) + 'static>(
5555
data: glib::ffi::gpointer,

0 commit comments

Comments
 (0)