File tree 7 files changed +8
-7
lines changed
7 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
# unreleased]
2
2
3
+ * Fixed 'double-reference clone' warnings.
3
4
* Dropped PA v4 support.
4
5
5
6
# 2.27.1 (January 9th, 2023)
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ impl DeviceManager {
198
198
// as_ptr() giving dangling pointers!
199
199
let mut c_devs: Vec < CString > = Vec :: with_capacity ( devices. len ( ) ) ;
200
200
for device in devices {
201
- c_devs. push ( CString :: new ( device. clone ( ) ) . unwrap ( ) ) ;
201
+ c_devs. push ( CString :: new ( * device) . unwrap ( ) ) ;
202
202
}
203
203
204
204
// Capture array of pointers to the above CString values.
@@ -246,7 +246,7 @@ impl DeviceManager {
246
246
let c_role = CString :: new ( role. clone ( ) ) . unwrap ( ) ;
247
247
let mut c_devs: Vec < CString > = Vec :: with_capacity ( devices. len ( ) ) ;
248
248
for device in devices {
249
- c_devs. push ( CString :: new ( device. clone ( ) ) . unwrap ( ) ) ;
249
+ c_devs. push ( CString :: new ( * device) . unwrap ( ) ) ;
250
250
}
251
251
252
252
// Capture array of pointers to the above CString values.
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ impl StreamRestore {
156
156
// as_ptr() giving dangling pointers!
157
157
let mut c_streams: Vec < CString > = Vec :: with_capacity ( streams. len ( ) ) ;
158
158
for stream in streams {
159
- c_streams. push ( CString :: new ( stream. clone ( ) ) . unwrap ( ) ) ;
159
+ c_streams. push ( CString :: new ( * stream) . unwrap ( ) ) ;
160
160
}
161
161
162
162
// Capture array of pointers to the above CString values.
Original file line number Diff line number Diff line change @@ -507,7 +507,7 @@ impl Context {
507
507
// as_ptr() giving dangling pointers!
508
508
let mut c_keys: Vec < CString > = Vec :: with_capacity ( keys. len ( ) ) ;
509
509
for key in keys {
510
- c_keys. push ( CString :: new ( key. clone ( ) ) . unwrap ( ) ) ;
510
+ c_keys. push ( CString :: new ( * key) . unwrap ( ) ) ;
511
511
}
512
512
513
513
// Capture array of pointers to the above CString values.
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ impl Info {
526
526
let c_key = CString :: new ( key. clone ( ) ) . unwrap ( ) ;
527
527
let mut c_values: Vec < CString > = Vec :: with_capacity ( values. len ( ) ) ;
528
528
for v in values {
529
- c_values. push ( CString :: new ( v . clone ( ) ) . unwrap ( ) ) ;
529
+ c_values. push ( CString :: new ( * v ) . unwrap ( ) ) ;
530
530
}
531
531
532
532
// Capture array of pointers to the above CString values
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ impl Proplist {
372
372
// as_ptr() giving dangling pointers!
373
373
let mut c_keys: Vec < CString > = Vec :: with_capacity ( keys. len ( ) ) ;
374
374
for k in keys {
375
- c_keys. push ( CString :: new ( k . clone ( ) ) . unwrap ( ) ) ;
375
+ c_keys. push ( CString :: new ( * k ) . unwrap ( ) ) ;
376
376
}
377
377
378
378
// Capture array of pointers to the above CString values.
Original file line number Diff line number Diff line change @@ -1752,7 +1752,7 @@ impl Stream {
1752
1752
// as_ptr() giving dangling pointers!
1753
1753
let mut c_keys: Vec < CString > = Vec :: with_capacity ( keys. len ( ) ) ;
1754
1754
for key in keys {
1755
- c_keys. push ( CString :: new ( key. clone ( ) ) . unwrap ( ) ) ;
1755
+ c_keys. push ( CString :: new ( * key) . unwrap ( ) ) ;
1756
1756
}
1757
1757
1758
1758
// Capture array of pointers to the above CString values
You can’t perform that action at this time.
0 commit comments