File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const ELEM_ID_SIZE: usize = 64;
2424pub struct DeviceIter < ' a > ( & ' a Ctl , c_int ) ;
2525
2626impl < ' a > DeviceIter < ' a > {
27- pub fn new ( ctl : & ' a Ctl ) -> DeviceIter {
27+ pub fn new ( ctl : & ' a Ctl ) -> DeviceIter < ' a > {
2828 DeviceIter ( ctl, -1 )
2929 }
3030}
Original file line number Diff line number Diff line change 2525//! }
2626//! ```
2727
28+ #![ allow( dead_code) ]
29+ /* There is a "field is never read" warning for the ElemIter struct. We still need to hold on
30+ to the HCtl pointer somehow; to guarantee that the HCtl does not go out of scope while we use
31+ ElemIter, which would make the snd_hctl_elem_t pointer invalid. Hence the decision to allow dead code here.
32+ I suppose there is a better solution for this but I'm not sure how.
33+ */
34+
35+
2836use crate :: { alsa, Card } ;
2937use std:: ffi:: { CStr , CString } ;
3038use super :: error:: * ;
You can’t perform that action at this time.
0 commit comments