Skip to content

Commit bb1837c

Browse files
committed
simplify some impl block lifetime expressions
1 parent efe601a commit bb1837c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

pulse-binding/src/context/ext_device_manager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct RolePriorityInfo<'a> {
3333
pub priority: u32,
3434
}
3535

36-
impl<'a> RolePriorityInfo<'a> {
36+
impl RolePriorityInfo<'_> {
3737
fn new_from_raw(p: *const RolePriorityInfoInternal) -> Self {
3838
assert!(!p.is_null());
3939
let src = unsafe { p.as_ref().unwrap() };
@@ -74,7 +74,7 @@ pub struct Info<'a> {
7474
pub role_priorities: Vec<RolePriorityInfo<'a>>,
7575
}
7676

77-
impl<'a> Info<'a> {
77+
impl Info<'_> {
7878
fn new_from_raw(p: *const InfoInternal) -> Self {
7979
assert!(!p.is_null());
8080
let src = unsafe { p.as_ref().unwrap() };

pulse-binding/src/context/ext_stream_restore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct Info<'a> {
4141
pub mute: bool,
4242
}
4343

44-
impl<'a> Info<'a> {
44+
impl Info<'_> {
4545
fn new_from_raw(p: *const InfoInternal) -> Self {
4646
assert!(!p.is_null());
4747
let src = unsafe { p.as_ref().unwrap() };

pulse-binding/src/context/introspect.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ pub struct SinkPortInfo<'a> {
298298
pub r#type: DevicePortType,
299299
}
300300

301-
impl<'a> SinkPortInfo<'a> {
301+
impl SinkPortInfo<'_> {
302302
fn new_from_raw(p: *const SinkPortInfoInternal) -> Self {
303303
assert!(!p.is_null());
304304
let src = unsafe { &*p };
@@ -390,7 +390,7 @@ pub struct SinkInfo<'a> {
390390
pub formats: Vec<format::Info>,
391391
}
392392

393-
impl<'a> SinkInfo<'a> {
393+
impl SinkInfo<'_> {
394394
fn new_from_raw(p: *const SinkInfoInternal) -> Self {
395395
assert!(!p.is_null());
396396
let src = unsafe { &*p };
@@ -725,7 +725,7 @@ pub struct SourcePortInfo<'a> {
725725
pub r#type: DevicePortType,
726726
}
727727

728-
impl<'a> SourcePortInfo<'a> {
728+
impl SourcePortInfo<'_> {
729729
fn new_from_raw(p: *const SourcePortInfoInternal) -> Self {
730730
assert!(!p.is_null());
731731
let src = unsafe { &*p };
@@ -817,7 +817,7 @@ pub struct SourceInfo<'a> {
817817
pub formats: Vec<format::Info>,
818818
}
819819

820-
impl<'a> SourceInfo<'a> {
820+
impl SourceInfo<'_> {
821821
fn new_from_raw(p: *const SourceInfoInternal) -> Self {
822822
assert!(!p.is_null());
823823
let src = unsafe { &*p };
@@ -1139,7 +1139,7 @@ pub struct ServerInfo<'a> {
11391139
pub channel_map: channelmap::Map,
11401140
}
11411141

1142-
impl<'a> ServerInfo<'a> {
1142+
impl ServerInfo<'_> {
11431143
fn new_from_raw(p: *const ServerInfoInternal) -> Self {
11441144
assert!(!p.is_null());
11451145
let src = unsafe { &*p };
@@ -1242,7 +1242,7 @@ pub struct ModuleInfo<'a> {
12421242
pub proplist: Proplist,
12431243
}
12441244

1245-
impl<'a> ModuleInfo<'a> {
1245+
impl ModuleInfo<'_> {
12461246
fn new_from_raw(p: *const ModuleInfoInternal) -> Self {
12471247
assert!(!p.is_null());
12481248
let src = unsafe { &*p };
@@ -1444,7 +1444,7 @@ pub struct ClientInfo<'a> {
14441444
pub proplist: Proplist,
14451445
}
14461446

1447-
impl<'a> ClientInfo<'a> {
1447+
impl ClientInfo<'_> {
14481448
fn new_from_raw(p: *const ClientInfoInternal) -> Self {
14491449
assert!(!p.is_null());
14501450
let src = unsafe { &*p };
@@ -1560,7 +1560,7 @@ pub struct CardProfileInfo<'a> {
15601560
pub available: bool,
15611561
}
15621562

1563-
impl<'a> CardProfileInfo<'a> {
1563+
impl CardProfileInfo<'_> {
15641564
fn new_from_raw(p: *const CardProfileInfoInternal) -> Self {
15651565
assert!(!p.is_null());
15661566
let src = unsafe { &*p };
@@ -1644,7 +1644,7 @@ pub struct CardPortInfo<'a> {
16441644
pub r#type: DevicePortType,
16451645
}
16461646

1647-
impl<'a> CardPortInfo<'a> {
1647+
impl CardPortInfo<'_> {
16481648
fn new_from_raw(p: *const CardPortInfoInternal) -> Self {
16491649
assert!(!p.is_null());
16501650
let src = unsafe { &*p };
@@ -1725,7 +1725,7 @@ pub struct CardInfo<'a> {
17251725
pub active_profile: Option<Box<CardProfileInfo<'a>>>,
17261726
}
17271727

1728-
impl<'a> CardInfo<'a> {
1728+
impl CardInfo<'_> {
17291729
fn new_from_raw(p: *const CardInfoInternal) -> Self {
17301730
assert!(!p.is_null());
17311731
let src = unsafe { &*p };
@@ -1957,7 +1957,7 @@ pub struct SinkInputInfo<'a> {
19571957
pub format: format::Info,
19581958
}
19591959

1960-
impl<'a> SinkInputInfo<'a> {
1960+
impl SinkInputInfo<'_> {
19611961
fn new_from_raw(p: *const SinkInputInfoInternal) -> Self {
19621962
assert!(!p.is_null());
19631963
let src = unsafe { &*p };
@@ -2198,7 +2198,7 @@ pub struct SourceOutputInfo<'a> {
21982198
pub format: format::Info,
21992199
}
22002200

2201-
impl<'a> SourceOutputInfo<'a> {
2201+
impl SourceOutputInfo<'_> {
22022202
fn new_from_raw(p: *const SourceOutputInfoInternal) -> Self {
22032203
assert!(!p.is_null());
22042204
let src = unsafe { &*p };
@@ -2449,7 +2449,7 @@ pub struct SampleInfo<'a> {
24492449
pub proplist: Proplist,
24502450
}
24512451

2452-
impl<'a> SampleInfo<'a> {
2452+
impl SampleInfo<'_> {
24532453
fn new_from_raw(p: *const SampleInfoInternal) -> Self {
24542454
assert!(!p.is_null());
24552455
let src = unsafe { &*p };

pulse-binding/src/proplist.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub struct Iterator<'a> {
170170
phantom: PhantomData<&'a ProplistInner>,
171171
}
172172

173-
impl<'a> Iterator<'a> {
173+
impl Iterator<'_> {
174174
fn new(pl: *mut ProplistInternal) -> Self {
175175
Self {
176176
pl_ref: ProplistInner { ptr: pl, weak: true },
@@ -180,7 +180,7 @@ impl<'a> Iterator<'a> {
180180
}
181181
}
182182

183-
impl<'a> std::iter::Iterator for Iterator<'a> {
183+
impl std::iter::Iterator for Iterator<'_> {
184184
type Item = String;
185185
fn next(&mut self) -> Option<Self::Item> {
186186
let state_actual = &mut self.state as *mut *mut c_void;

0 commit comments

Comments
 (0)