File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,7 @@ gvalue_impl_inline!(
141
141
impl Rectangle {
142
142
#[ inline]
143
143
pub fn to_raw_none ( & self ) -> * mut ffi:: cairo_rectangle_t {
144
- let ptr = self as * const Rectangle as usize ;
145
- ptr as * mut ffi:: cairo_rectangle_t
144
+ & self . 0 as * const ffi:: cairo_rectangle_t as * mut ffi:: cairo_rectangle_t
146
145
}
147
146
}
148
147
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ gvalue_impl_inline!(
141
141
impl RectangleInt {
142
142
#[ inline]
143
143
pub fn to_raw_none ( & self ) -> * mut ffi:: cairo_rectangle_int_t {
144
- let ptr = self as * const RectangleInt as usize ;
145
- ptr as * mut ffi:: cairo_rectangle_int_t
144
+ & self . 0 as * const ffi:: cairo_rectangle_int_t as * mut ffi:: cairo_rectangle_int_t
146
145
}
147
146
}
Original file line number Diff line number Diff line change @@ -89,9 +89,7 @@ pub trait DesktopAppInfoExtManual: sealed::Sealed + IsA<DesktopAppInfo> {
89
89
) {
90
90
let appinfo = from_glib_borrow ( appinfo) ;
91
91
let pid = from_glib ( pid) ;
92
- let callback: * mut Option < & mut dyn ( FnMut ( & DesktopAppInfo , glib:: Pid ) ) > =
93
- user_data as * const _ as usize
94
- as * mut Option < & mut dyn ( FnMut ( & DesktopAppInfo , glib:: Pid ) ) > ;
92
+ let callback = user_data as * mut Option < & mut dyn ( FnMut ( & DesktopAppInfo , glib:: Pid ) ) > ;
95
93
if let Some ( ref mut callback) = * callback {
96
94
callback ( & appinfo, pid)
97
95
} else {
@@ -116,7 +114,7 @@ pub trait DesktopAppInfoExtManual: sealed::Sealed + IsA<DesktopAppInfo> {
116
114
user_setup,
117
115
Box_ :: into_raw ( super_callback0) as * mut _ ,
118
116
pid_callback,
119
- super_callback1 as * const _ as usize as * mut _ ,
117
+ super_callback1 as * const _ as * mut _ ,
120
118
stdin_fd. as_raw_fd ( ) ,
121
119
stdout_fd. as_raw_fd ( ) ,
122
120
stderr_fd. as_raw_fd ( ) ,
You can’t perform that action at this time.
0 commit comments