@@ -201,101 +201,95 @@ impl Device {
201
201
#[ cfg( any( feature = "xlib" , feature = "xcb" , feature = "dox" ) ) ]
202
202
#[ doc( alias = "cairo_xlib_device_debug_cap_xrender_version" ) ]
203
203
#[ doc( alias = "cairo_xcb_device_debug_cap_xrender_version" ) ]
204
- pub fn debug_cap_xrender_version ( & self , major_version : i32 , minor_version : i32 ) {
205
- unsafe {
206
- match self . type_ ( ) {
207
- DeviceType :: Xlib => {
208
- #[ cfg( feature = "xlib" ) ]
209
- {
210
- ffi:: cairo_xlib_device_debug_cap_xrender_version (
211
- self . to_raw_none ( ) ,
212
- major_version,
213
- minor_version,
214
- )
215
- }
216
- #[ cfg( not( feature = "xlib" ) ) ]
217
- {
218
- panic ! ( "you need to enable \" xlib\" feature" )
219
- }
204
+ pub fn debug_cap_xrender_version ( & self , _major_version : i32 , _minor_version : i32 ) {
205
+ match self . type_ ( ) {
206
+ DeviceType :: Xlib => {
207
+ #[ cfg( feature = "xlib" ) ]
208
+ unsafe {
209
+ ffi:: cairo_xlib_device_debug_cap_xrender_version (
210
+ self . to_raw_none ( ) ,
211
+ _major_version,
212
+ _minor_version,
213
+ )
214
+ }
215
+ #[ cfg( not( feature = "xlib" ) ) ]
216
+ {
217
+ panic ! ( "you need to enable \" xlib\" feature" )
218
+ }
219
+ }
220
+ DeviceType :: Xcb => {
221
+ #[ cfg( feature = "xcb" ) ]
222
+ unsafe {
223
+ ffi:: cairo_xcb_device_debug_cap_xrender_version (
224
+ self . to_raw_none ( ) ,
225
+ _major_version,
226
+ _minor_version,
227
+ )
220
228
}
221
- DeviceType :: Xcb => {
222
- #[ cfg( feature = "xcb" ) ]
223
- {
224
- ffi:: cairo_xcb_device_debug_cap_xrender_version (
225
- self . to_raw_none ( ) ,
226
- major_version,
227
- minor_version,
228
- )
229
- }
230
- #[ cfg( not( feature = "xcb" ) ) ]
231
- {
232
- panic ! ( "you need to enable \" xcb\" feature" )
233
- }
229
+ #[ cfg( not( feature = "xcb" ) ) ]
230
+ {
231
+ panic ! ( "you need to enable \" xcb\" feature" )
234
232
}
235
- d => panic ! ( "invalid device type: {}" , d) ,
236
233
}
234
+ d => panic ! ( "invalid device type: {}" , d) ,
237
235
}
238
236
}
239
237
240
238
#[ cfg( any( feature = "xlib" , feature = "xcb" , feature = "dox" ) ) ]
241
239
#[ doc( alias = "cairo_xlib_device_debug_get_precision" ) ]
242
240
#[ doc( alias = "cairo_xcb_device_debug_get_precision" ) ]
243
241
pub fn debug_get_precision ( & self ) -> i32 {
244
- unsafe {
245
- match self . type_ ( ) {
246
- DeviceType :: Xlib => {
247
- #[ cfg( feature = "xlib" ) ]
248
- {
249
- ffi:: cairo_xlib_device_debug_get_precision ( self . to_raw_none ( ) )
250
- }
251
- #[ cfg( not( feature = "xlib" ) ) ]
252
- {
253
- panic ! ( "you need to enable \" xlib\" feature" )
254
- }
242
+ match self . type_ ( ) {
243
+ DeviceType :: Xlib => {
244
+ #[ cfg( feature = "xlib" ) ]
245
+ unsafe {
246
+ ffi:: cairo_xlib_device_debug_get_precision ( self . to_raw_none ( ) )
247
+ }
248
+ #[ cfg( not( feature = "xlib" ) ) ]
249
+ {
250
+ panic ! ( "you need to enable \" xlib\" feature" )
255
251
}
256
- DeviceType :: Xcb => {
257
- # [ cfg ( feature = "xcb" ) ]
258
- {
259
- ffi :: cairo_xcb_device_debug_get_precision ( self . to_raw_none ( ) )
260
- }
261
- # [ cfg ( not ( feature = "xcb" ) ) ]
262
- {
263
- panic ! ( "you need to enable \" xcb \" feature" )
264
- }
252
+ }
253
+ DeviceType :: Xcb => {
254
+ # [ cfg ( feature = "xcb" ) ]
255
+ unsafe {
256
+ ffi :: cairo_xcb_device_debug_get_precision ( self . to_raw_none ( ) )
257
+ }
258
+ # [ cfg ( not ( feature = "xcb" ) ) ]
259
+ {
260
+ panic ! ( "you need to enable \" xcb \" feature" )
265
261
}
266
- d => panic ! ( "invalid device type: {}" , d) ,
267
262
}
263
+ d => panic ! ( "invalid device type: {}" , d) ,
268
264
}
269
265
}
270
266
271
267
#[ cfg( any( feature = "xlib" , feature = "xcb" , feature = "dox" ) ) ]
272
268
#[ doc( alias = "cairo_xlib_device_debug_set_precision" ) ]
273
269
#[ doc( alias = "cairo_xcb_device_debug_set_precision" ) ]
274
- pub fn debug_set_precision ( & self , precision : i32 ) {
275
- unsafe {
276
- match self . type_ ( ) {
277
- DeviceType :: Xlib => {
278
- #[ cfg( feature = "xlib" ) ]
279
- {
280
- ffi:: cairo_xlib_device_debug_set_precision ( self . to_raw_none ( ) , precision)
281
- }
282
- #[ cfg( not( feature = "xlib" ) ) ]
283
- {
284
- panic ! ( "you need to enable \" xlib\" feature" )
285
- }
270
+ pub fn debug_set_precision ( & self , _precision : i32 ) {
271
+ match self . type_ ( ) {
272
+ DeviceType :: Xlib => {
273
+ #[ cfg( feature = "xlib" ) ]
274
+ unsafe {
275
+ ffi:: cairo_xlib_device_debug_set_precision ( self . to_raw_none ( ) , _precision)
276
+ }
277
+ #[ cfg( not( feature = "xlib" ) ) ]
278
+ {
279
+ panic ! ( "you need to enable \" xlib\" feature" )
280
+ }
281
+ }
282
+ DeviceType :: Xcb => {
283
+ #[ cfg( feature = "xcb" ) ]
284
+ unsafe {
285
+ ffi:: cairo_xcb_device_debug_set_precision ( self . to_raw_none ( ) , _precision)
286
286
}
287
- DeviceType :: Xcb => {
288
- #[ cfg( feature = "xcb" ) ]
289
- {
290
- ffi:: cairo_xcb_device_debug_set_precision ( self . to_raw_none ( ) , precision)
291
- }
292
- #[ cfg( not( feature = "xcb" ) ) ]
293
- {
294
- panic ! ( "you need to enable \" xcb\" feature" )
295
- }
287
+ #[ cfg( not( feature = "xcb" ) ) ]
288
+ {
289
+ panic ! ( "you need to enable \" xcb\" feature" )
296
290
}
297
- d => panic ! ( "invalid device type: {}" , d) ,
298
291
}
292
+ d => panic ! ( "invalid device type: {}" , d) ,
299
293
}
300
294
}
301
295
0 commit comments