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

Commit 7b72259

Browse files
sdroegepbor
authored andcommitted
gtk: Fix new clippy warning
``` error: this expression creates a reference which is immediately dereferenced by the compiler --> gtk/src/stack_switcher.rs:52:15 | 52 | f(&StackSwitcher::from_glib_borrow(this).unsafe_cast_ref()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `StackSwitcher::from_glib_borrow(this).unsafe_cast_ref()` | = 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 4452940 commit 7b72259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gtk/src/stack_switcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl<O: IsA<StackSwitcher>> StackSwitcherExtManual for O {
6565
f: glib::ffi::gpointer,
6666
) {
6767
let f: &F = &*(f as *const F);
68-
f(&StackSwitcher::from_glib_borrow(this).unsafe_cast_ref())
68+
f(StackSwitcher::from_glib_borrow(this).unsafe_cast_ref())
6969
}
7070
unsafe {
7171
let f: Box_<F> = Box_::new(f);

0 commit comments

Comments
 (0)