@@ -67,9 +67,9 @@ fn get_objects() -> HashMap<Path<'static>, HashMap<String, PropMap>> {
67
67
1000 ,
68
68
( HashMap <Path <' static >, HashMap <String , PropMap >>, ) ,
69
69
) ;
70
- if let Err ( error ) = res {
70
+ if let Err ( _error ) = res {
71
71
ERROR ! (
72
- format!( "Could not to get bluetooth objects {}" , error ) ,
72
+ format!( "Could not to get bluetooth objects {}" , _error ) ,
73
73
ErrorLevel :: PartialBreakage
74
74
) ;
75
75
return HashMap :: new ( ) ;
@@ -275,19 +275,19 @@ impl BluetoothInterface {
275
275
)
276
276
. append1 ( device) ;
277
277
let res = added_ref. send ( msg) ;
278
- if let Err ( error ) = res {
278
+ if let Err ( _error ) = res {
279
279
ERROR ! (
280
- format!( "Could not send signal: {:?}" , error ) ,
280
+ format!( "Could not send signal: {:?}" , _error ) ,
281
281
ErrorLevel :: PartialBreakage
282
282
) ;
283
283
}
284
284
}
285
285
true
286
286
} ,
287
287
) ;
288
- if let Err ( error ) = res {
288
+ if let Err ( _error ) = res {
289
289
ERROR ! (
290
- format!( "Failed to match signal on bluez {:?}" , error ) ,
290
+ format!( "Failed to match signal on bluez {:?}" , _error ) ,
291
291
ErrorLevel :: Critical
292
292
) ;
293
293
return Err ( dbus:: Error :: new_custom (
@@ -305,18 +305,18 @@ impl BluetoothInterface {
305
305
)
306
306
. append1 ( ir. object ) ;
307
307
let res = removed_ref. send ( msg) ;
308
- if let Err ( error ) = res {
308
+ if let Err ( _error ) = res {
309
309
ERROR ! (
310
- format!( "Could not send signal {:?}" , error ) ,
310
+ format!( "Could not send signal {:?}" , _error ) ,
311
311
ErrorLevel :: PartialBreakage
312
312
) ;
313
313
}
314
314
true
315
315
} ,
316
316
) ;
317
- if let Err ( error ) = res {
317
+ if let Err ( _error ) = res {
318
318
ERROR ! (
319
- format!( "Failed to match signal on bluez {:?}" , error ) ,
319
+ format!( "Failed to match signal on bluez {:?}" , _error ) ,
320
320
ErrorLevel :: Critical
321
321
) ;
322
322
return Err ( dbus:: Error :: new_custom (
@@ -346,9 +346,9 @@ impl BluetoothInterface {
346
346
)
347
347
. append1 ( device) ;
348
348
let res = changed_ref. clone ( ) . send ( msg) ;
349
- if let Err ( error ) = res {
349
+ if let Err ( _error ) = res {
350
350
ERROR ! (
351
- format!( "Could not send signal: {:?}" , error ) ,
351
+ format!( "Could not send signal: {:?}" , _error ) ,
352
352
ErrorLevel :: PartialBreakage
353
353
) ;
354
354
}
@@ -361,9 +361,9 @@ impl BluetoothInterface {
361
361
}
362
362
} ,
363
363
) ;
364
- if let Err ( error ) = res {
364
+ if let Err ( _error ) = res {
365
365
ERROR ! (
366
- format!( "Failed to match signal on bluez: {:?}" , error ) ,
366
+ format!( "Failed to match signal on bluez: {:?}" , _error ) ,
367
367
ErrorLevel :: Critical
368
368
) ;
369
369
return Err ( dbus:: Error :: new_custom (
@@ -389,9 +389,9 @@ impl BluetoothInterface {
389
389
stop_requested. store ( false , Ordering :: SeqCst ) ;
390
390
let res: Result < ( ) , dbus:: Error > =
391
391
proxy. method_call ( BLUEZ_ADAPTER_INTERFACE ! ( ) , "StopDiscovery" , ( ) ) ;
392
- if let Err ( error ) = res {
392
+ if let Err ( _error ) = res {
393
393
ERROR ! (
394
- format!( "Failed to stop bluetooth discovery: {:?}" , error ) ,
394
+ format!( "Failed to stop bluetooth discovery: {:?}" , _error ) ,
395
395
ErrorLevel :: Critical
396
396
) ;
397
397
} else {
@@ -403,9 +403,9 @@ impl BluetoothInterface {
403
403
scan_request. store ( 0 , Ordering :: SeqCst ) ;
404
404
let res: Result < ( ) , dbus:: Error > =
405
405
proxy. method_call ( BLUEZ_ADAPTER_INTERFACE ! ( ) , "StartDiscovery" , ( ) ) ;
406
- if let Err ( error ) = res {
406
+ if let Err ( _error ) = res {
407
407
ERROR ! (
408
- format!( "Failed to start bluetooth discovery: {:?}" , error ) ,
408
+ format!( "Failed to start bluetooth discovery: {:?}" , _error ) ,
409
409
ErrorLevel :: Critical
410
410
) ;
411
411
} else {
@@ -415,9 +415,9 @@ impl BluetoothInterface {
415
415
scan_request. store ( 0 , Ordering :: SeqCst ) ;
416
416
let res: Result < ( ) , dbus:: Error > =
417
417
proxy. method_call ( BLUEZ_ADAPTER_INTERFACE ! ( ) , "StopDiscovery" , ( ) ) ;
418
- if let Err ( error ) = res {
418
+ if let Err ( _error ) = res {
419
419
ERROR ! (
420
- format!( "Failed to stop bluetooth discovery: {:?}" , error ) ,
420
+ format!( "Failed to stop bluetooth discovery: {:?}" , _error ) ,
421
421
ErrorLevel :: Critical
422
422
) ;
423
423
} else {
@@ -441,11 +441,11 @@ impl BluetoothInterface {
441
441
10000 ,
442
442
( ) ,
443
443
) ;
444
- if let Err ( error ) = res {
444
+ if let Err ( _error ) = res {
445
445
ERROR ! (
446
446
format!(
447
447
"Failed to connect to bluetooth device: {} with error: {}" ,
448
- device, error
448
+ device, _error
449
449
) ,
450
450
ErrorLevel :: Critical
451
451
) ;
@@ -467,11 +467,11 @@ impl BluetoothInterface {
467
467
10000 ,
468
468
( ) ,
469
469
) ;
470
- if let Err ( error ) = res {
470
+ if let Err ( _error ) = res {
471
471
ERROR ! (
472
472
format!(
473
473
"Failed to pair with bluetooth device: {} with error {}" ,
474
- device, error
474
+ device, _error
475
475
) ,
476
476
ErrorLevel :: Critical
477
477
) ;
@@ -504,9 +504,9 @@ impl BluetoothInterface {
504
504
1000 ,
505
505
( ) ,
506
506
) ;
507
- if let Err ( error ) = res {
507
+ if let Err ( _error ) = res {
508
508
ERROR ! (
509
- format!( "Failed to register bluetooth agent: {}" , error ) ,
509
+ format!( "Failed to register bluetooth agent: {}" , _error ) ,
510
510
ErrorLevel :: PartialBreakage
511
511
) ;
512
512
return false ;
@@ -528,9 +528,9 @@ impl BluetoothInterface {
528
528
1000 ,
529
529
( Path <' static >, ) ,
530
530
) ;
531
- if let Err ( error ) = res {
531
+ if let Err ( _error ) = res {
532
532
ERROR ! (
533
- format!( "Failed to unregister bluetooth agent {}" , error ) ,
533
+ format!( "Failed to unregister bluetooth agent {}" , _error ) ,
534
534
ErrorLevel :: PartialBreakage
535
535
) ;
536
536
return false ;
@@ -553,9 +553,9 @@ impl BluetoothInterface {
553
553
1000 ,
554
554
( ) ,
555
555
) ;
556
- if let Err ( error ) = res {
556
+ if let Err ( _error ) = res {
557
557
ERROR ! (
558
- format!( "Failed to start bluetooth discovery: {}" , error ) ,
558
+ format!( "Failed to start bluetooth discovery: {}" , _error ) ,
559
559
ErrorLevel :: PartialBreakage
560
560
) ;
561
561
} else {
@@ -573,9 +573,9 @@ impl BluetoothInterface {
573
573
1000 ,
574
574
( ) ,
575
575
) ;
576
- if let Err ( error ) = res {
576
+ if let Err ( _error ) = res {
577
577
ERROR ! (
578
- format!( "Could not stop bluetooth discovery {}" , error ) ,
578
+ format!( "Could not stop bluetooth discovery {}" , _error ) ,
579
579
ErrorLevel :: PartialBreakage
580
580
) ;
581
581
} else {
@@ -606,11 +606,11 @@ fn get_bluetooth_device_properties(path: &Path<'static>) -> PropMap {
606
606
1000 ,
607
607
( PropMap , ) ,
608
608
) ;
609
- if let Err ( error ) = res {
609
+ if let Err ( _error ) = res {
610
610
ERROR ! (
611
611
format!(
612
612
"Failed to get properties of bluetooth device: {} with error: {}" ,
613
- path, error
613
+ path, _error
614
614
) ,
615
615
ErrorLevel :: Recoverable
616
616
) ;
@@ -627,11 +627,11 @@ pub fn set_adapter_enabled(path: Path<'static>, enabled: bool) -> bool {
627
627
"Powered" ,
628
628
enabled,
629
629
) ;
630
- if let Err ( error ) = res {
630
+ if let Err ( _error ) = res {
631
631
ERROR ! (
632
632
format!(
633
633
"Failed to set enabled mode on bluetooth adapter {} to: {} with error: {}" ,
634
- path, enabled, error
634
+ path, enabled, _error
635
635
) ,
636
636
ErrorLevel :: Recoverable
637
637
) ;
@@ -648,11 +648,11 @@ pub fn set_adapter_discoverable(path: Path<'static>, enabled: bool) -> bool {
648
648
"Discoverable" ,
649
649
enabled,
650
650
) ;
651
- if let Err ( error ) = res {
651
+ if let Err ( _error ) = res {
652
652
ERROR ! (
653
653
format!(
654
654
"Failed to set discoverability mode on bluetooth adapter {} to: {} with error: {}" ,
655
- path, enabled, error
655
+ path, enabled, _error
656
656
) ,
657
657
ErrorLevel :: Recoverable
658
658
) ;
@@ -669,11 +669,11 @@ pub fn set_adapter_pairable(path: Path<'static>, enabled: bool) -> bool {
669
669
"Pairable" ,
670
670
enabled,
671
671
) ;
672
- if let Err ( error ) = res {
672
+ if let Err ( _error ) = res {
673
673
ERROR ! (
674
674
format!(
675
675
"Failed to set pairability mode on bluetooth adapter {} to: {} with error: {}" ,
676
- path, enabled, error
676
+ path, enabled, _error
677
677
) ,
678
678
ErrorLevel :: Recoverable
679
679
) ;
0 commit comments