@@ -464,7 +464,7 @@ impl Introspector {
464
464
{
465
465
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
466
466
// as_ptr() giving dangling pointers!
467
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
467
+ let c_name = CString :: new ( name) . unwrap ( ) ;
468
468
469
469
let cb_data = box_closure_get_capi_ptr :: < dyn FnMut ( ListResult < & SinkInfo > ) > ( Box :: new ( callback) ) ;
470
470
let ptr = unsafe { capi:: pa_context_get_sink_info_by_name ( self . context , c_name. as_ptr ( ) ,
@@ -522,7 +522,7 @@ impl Introspector {
522
522
{
523
523
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
524
524
// as_ptr() giving dangling pointers!
525
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
525
+ let c_name = CString :: new ( name) . unwrap ( ) ;
526
526
527
527
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
528
528
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -556,7 +556,7 @@ impl Introspector {
556
556
{
557
557
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
558
558
// as_ptr() giving dangling pointers!
559
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
559
+ let c_name = CString :: new ( name) . unwrap ( ) ;
560
560
561
561
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
562
562
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -575,7 +575,7 @@ impl Introspector {
575
575
{
576
576
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
577
577
// as_ptr() giving dangling pointers!
578
- let c_name = CString :: new ( sink_name. clone ( ) ) . unwrap ( ) ;
578
+ let c_name = CString :: new ( sink_name) . unwrap ( ) ;
579
579
580
580
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
581
581
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -610,7 +610,7 @@ impl Introspector {
610
610
{
611
611
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
612
612
// as_ptr() giving dangling pointers!
613
- let c_port = CString :: new ( port. clone ( ) ) . unwrap ( ) ;
613
+ let c_port = CString :: new ( port) . unwrap ( ) ;
614
614
615
615
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
616
616
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -629,8 +629,8 @@ impl Introspector {
629
629
{
630
630
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
631
631
// as_ptr() giving dangling pointers!
632
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
633
- let c_port = CString :: new ( port. clone ( ) ) . unwrap ( ) ;
632
+ let c_name = CString :: new ( name) . unwrap ( ) ;
633
+ let c_port = CString :: new ( port) . unwrap ( ) ;
634
634
635
635
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
636
636
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -868,7 +868,7 @@ impl Introspector {
868
868
{
869
869
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
870
870
// as_ptr() giving dangling pointers!
871
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
871
+ let c_name = CString :: new ( name) . unwrap ( ) ;
872
872
873
873
let cb_data = box_closure_get_capi_ptr :: < dyn FnMut ( ListResult < & SourceInfo > ) > ( Box :: new ( callback) ) ;
874
874
let ptr = unsafe { capi:: pa_context_get_source_info_by_name ( self . context , c_name. as_ptr ( ) ,
@@ -927,7 +927,7 @@ impl Introspector {
927
927
{
928
928
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
929
929
// as_ptr() giving dangling pointers!
930
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
930
+ let c_name = CString :: new ( name) . unwrap ( ) ;
931
931
932
932
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
933
933
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -961,7 +961,7 @@ impl Introspector {
961
961
{
962
962
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
963
963
// as_ptr() giving dangling pointers!
964
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
964
+ let c_name = CString :: new ( name) . unwrap ( ) ;
965
965
966
966
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
967
967
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -980,7 +980,7 @@ impl Introspector {
980
980
{
981
981
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
982
982
// as_ptr() giving dangling pointers!
983
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
983
+ let c_name = CString :: new ( name) . unwrap ( ) ;
984
984
985
985
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
986
986
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1015,7 +1015,7 @@ impl Introspector {
1015
1015
{
1016
1016
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1017
1017
// as_ptr() giving dangling pointers!
1018
- let c_port = CString :: new ( port. clone ( ) ) . unwrap ( ) ;
1018
+ let c_port = CString :: new ( port) . unwrap ( ) ;
1019
1019
1020
1020
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1021
1021
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1034,8 +1034,8 @@ impl Introspector {
1034
1034
{
1035
1035
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1036
1036
// as_ptr() giving dangling pointers!
1037
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
1038
- let c_port = CString :: new ( port. clone ( ) ) . unwrap ( ) ;
1037
+ let c_name = CString :: new ( name) . unwrap ( ) ;
1038
+ let c_port = CString :: new ( port) . unwrap ( ) ;
1039
1039
1040
1040
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1041
1041
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1239,8 +1239,8 @@ impl Introspector {
1239
1239
{
1240
1240
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1241
1241
// as_ptr() giving dangling pointers!
1242
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
1243
- let c_arg = CString :: new ( argument. clone ( ) ) . unwrap ( ) ;
1242
+ let c_name = CString :: new ( name) . unwrap ( ) ;
1243
+ let c_arg = CString :: new ( argument) . unwrap ( ) ;
1244
1244
1245
1245
let cb_data = box_closure_get_capi_ptr :: < dyn FnMut ( u32 ) > ( Box :: new ( callback) ) ;
1246
1246
let ptr = unsafe { capi:: pa_context_load_module ( self . context , c_name. as_ptr ( ) ,
@@ -1696,7 +1696,7 @@ impl Introspector {
1696
1696
{
1697
1697
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1698
1698
// as_ptr() giving dangling pointers!
1699
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
1699
+ let c_name = CString :: new ( name) . unwrap ( ) ;
1700
1700
1701
1701
let cb_data = box_closure_get_capi_ptr :: < dyn FnMut ( ListResult < & CardInfo > ) > ( Box :: new ( callback) ) ;
1702
1702
let ptr = unsafe { capi:: pa_context_get_card_info_by_name ( self . context , c_name. as_ptr ( ) ,
@@ -1726,7 +1726,7 @@ impl Introspector {
1726
1726
{
1727
1727
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1728
1728
// as_ptr() giving dangling pointers!
1729
- let c_profile = CString :: new ( profile. clone ( ) ) . unwrap ( ) ;
1729
+ let c_profile = CString :: new ( profile) . unwrap ( ) ;
1730
1730
1731
1731
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1732
1732
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1745,8 +1745,8 @@ impl Introspector {
1745
1745
{
1746
1746
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1747
1747
// as_ptr() giving dangling pointers!
1748
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
1749
- let c_profile = CString :: new ( profile. clone ( ) ) . unwrap ( ) ;
1748
+ let c_name = CString :: new ( name) . unwrap ( ) ;
1749
+ let c_profile = CString :: new ( profile) . unwrap ( ) ;
1750
1750
1751
1751
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1752
1752
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1765,8 +1765,8 @@ impl Introspector {
1765
1765
{
1766
1766
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1767
1767
// as_ptr() giving dangling pointers!
1768
- let c_name = CString :: new ( card_name. clone ( ) ) . unwrap ( ) ;
1769
- let c_port = CString :: new ( port_name. clone ( ) ) . unwrap ( ) ;
1768
+ let c_name = CString :: new ( card_name) . unwrap ( ) ;
1769
+ let c_port = CString :: new ( port_name) . unwrap ( ) ;
1770
1770
1771
1771
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1772
1772
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -1936,7 +1936,7 @@ impl Introspector {
1936
1936
{
1937
1937
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
1938
1938
// as_ptr() giving dangling pointers!
1939
- let c_name = CString :: new ( sink_name. clone ( ) ) . unwrap ( ) ;
1939
+ let c_name = CString :: new ( sink_name) . unwrap ( ) ;
1940
1940
1941
1941
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
1942
1942
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -2165,7 +2165,7 @@ impl Introspector {
2165
2165
{
2166
2166
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
2167
2167
// as_ptr() giving dangling pointers!
2168
- let c_name = CString :: new ( source_name. clone ( ) ) . unwrap ( ) ;
2168
+ let c_name = CString :: new ( source_name) . unwrap ( ) ;
2169
2169
2170
2170
let ( cb_fn, cb_data) : ( Option < extern "C" fn ( _, _, _) > , _ ) =
2171
2171
get_su_capi_params :: < _ , _ > ( callback, super :: success_cb_proxy) ;
@@ -2349,7 +2349,7 @@ impl Introspector {
2349
2349
{
2350
2350
// Warning: New CStrings will be immediately freed if not bound to a variable, leading to
2351
2351
// as_ptr() giving dangling pointers!
2352
- let c_name = CString :: new ( name. clone ( ) ) . unwrap ( ) ;
2352
+ let c_name = CString :: new ( name) . unwrap ( ) ;
2353
2353
2354
2354
let cb_data = box_closure_get_capi_ptr :: < dyn FnMut ( ListResult < & SampleInfo > ) > ( Box :: new ( callback) ) ;
2355
2355
let ptr = unsafe { capi:: pa_context_get_sample_info_by_name ( self . context , c_name. as_ptr ( ) ,
0 commit comments