Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7355810

Browse filesBrowse files
uefi: Fix mismatched_lifetime_syntaxes lint
1 parent 43aee08 commit 7355810
Copy full SHA for 7355810

File tree

Expand file treeCollapse file tree

7 files changed

+22
-18
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+22
-18
lines changed

‎uefi/src/data_types/strs.rs

Copy file name to clipboardExpand all lines: uefi/src/data_types/strs.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ impl CStr16 {
569569

570570
/// Returns an iterator over this C string
571571
#[must_use]
572-
pub const fn iter(&self) -> CStr16Iter {
572+
pub const fn iter(&self) -> CStr16Iter<'_> {
573573
CStr16Iter {
574574
inner: self,
575575
pos: 0,

‎uefi/src/fs/path/path.rs

Copy file name to clipboardExpand all lines: uefi/src/fs/path/path.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Path {
3737

3838
/// Iterator over the components of a path.
3939
#[must_use]
40-
pub fn components(&self) -> Components {
40+
pub fn components(&self) -> Components<'_> {
4141
Components {
4242
path: self.as_ref(),
4343
i: 0,

‎uefi/src/proto/console/gop.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/console/gop.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl GraphicsOutput {
104104

105105
/// Returns a [`ModeIter`].
106106
#[must_use]
107-
pub const fn modes(&self) -> ModeIter {
107+
pub const fn modes(&self) -> ModeIter<'_> {
108108
ModeIter {
109109
gop: self,
110110
current: 0,
@@ -295,7 +295,7 @@ impl GraphicsOutput {
295295
}
296296

297297
/// Access the frame buffer directly
298-
pub fn frame_buffer(&mut self) -> FrameBuffer {
298+
pub fn frame_buffer(&mut self) -> FrameBuffer<'_> {
299299
assert!(
300300
self.current_mode_info().pixel_format() != PixelFormat::BltOnly,
301301
"Cannot access the framebuffer in a Blt-only mode"

‎uefi/src/proto/device_path/mod.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/device_path/mod.rs
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl DevicePathNode {
289289

290290
/// Convert from a generic [`DevicePathNode`] reference to an enum
291291
/// of more specific node types.
292-
pub fn as_enum(&self) -> Result<DevicePathNodeEnum, NodeConversionError> {
292+
pub fn as_enum(&self) -> Result<DevicePathNodeEnum<'_>, NodeConversionError> {
293293
DevicePathNodeEnum::try_from(self)
294294
}
295295

@@ -365,7 +365,7 @@ impl DevicePathInstance {
365365
///
366366
/// [`DevicePathNodes`]: DevicePathNode
367367
#[must_use]
368-
pub const fn node_iter(&self) -> DevicePathNodeIterator {
368+
pub const fn node_iter(&self) -> DevicePathNodeIterator<'_> {
369369
DevicePathNodeIterator {
370370
nodes: &self.data,
371371
stop_condition: StopCondition::AnyEndNode,
@@ -539,7 +539,7 @@ impl DevicePath {
539539

540540
/// Get an iterator over the [`DevicePathInstance`]s in this path.
541541
#[must_use]
542-
pub const fn instance_iter(&self) -> DevicePathInstanceIterator {
542+
pub const fn instance_iter(&self) -> DevicePathInstanceIterator<'_> {
543543
DevicePathInstanceIterator {
544544
remaining_path: Some(self),
545545
}
@@ -550,7 +550,7 @@ impl DevicePath {
550550
/// [`is_end_entire`][DevicePathNode::is_end_entire] is true. That ending
551551
/// path is not returned by the iterator.
552552
#[must_use]
553-
pub const fn node_iter(&self) -> DevicePathNodeIterator {
553+
pub const fn node_iter(&self) -> DevicePathNodeIterator<'_> {
554554
DevicePathNodeIterator {
555555
nodes: &self.data,
556556
stop_condition: StopCondition::EndEntireNode,

‎uefi/src/proto/driver/component_name.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/driver/component_name.rs
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ impl ComponentName1 {
4343
/// English is encoded as "eng".
4444
///
4545
/// [ISO 639-2]: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
46-
pub const fn supported_languages(&self) -> core::result::Result<LanguageIter, LanguageError> {
46+
pub const fn supported_languages(
47+
&self,
48+
) -> core::result::Result<LanguageIter<'_>, LanguageError> {
4749
LanguageIter::new(self.0.supported_languages, LanguageIterKind::V1)
4850
}
4951

@@ -110,7 +112,9 @@ impl ComponentName2 {
110112
/// as "en".
111113
///
112114
/// [RFC 4646]: https://www.rfc-editor.org/rfc/rfc4646
113-
pub const fn supported_languages(&self) -> core::result::Result<LanguageIter, LanguageError> {
115+
pub const fn supported_languages(
116+
&self,
117+
) -> core::result::Result<LanguageIter<'_>, LanguageError> {
114118
LanguageIter::new(self.0.supported_languages, LanguageIterKind::V2)
115119
}
116120

@@ -185,7 +189,7 @@ impl ComponentName {
185189
/// [ISO 639-2]: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
186190
/// [RFC 4646]: https://www.rfc-editor.org/rfc/rfc4646
187191
#[allow(clippy::missing_const_for_fn)] // false-positive since Rust 1.86
188-
pub fn supported_languages(&self) -> core::result::Result<LanguageIter, LanguageError> {
192+
pub fn supported_languages(&self) -> core::result::Result<LanguageIter<'_>, LanguageError> {
189193
match self {
190194
Self::V1(cn1) => cn1.supported_languages(),
191195
Self::V2(cn2) => cn2.supported_languages(),

‎uefi/src/proto/tcg/v1.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/tcg/v1.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl EventLog<'_> {
276276

277277
/// Iterator of events in the log.
278278
#[must_use]
279-
pub const fn iter(&self) -> EventLogIter {
279+
pub const fn iter(&self) -> EventLogIter<'_> {
280280
EventLogIter {
281281
log: self,
282282
location: self.location,
@@ -356,7 +356,7 @@ pub struct StatusCheck<'a> {
356356
impl Tcg {
357357
/// Get information about the protocol and TPM device, as well as
358358
/// the TPM event log.
359-
pub fn status_check(&mut self) -> Result<StatusCheck> {
359+
pub fn status_check(&mut self) -> Result<StatusCheck<'_>> {
360360
let mut protocol_capability = TcgBootServiceCapability::default();
361361
let mut feature_flags = 0;
362362
let mut event_log_location = 0;

‎uefi/src/proto/tcg/v2.rs

Copy file name to clipboardExpand all lines: uefi/src/proto/tcg/v2.rs
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pub struct EventLog<'a> {
336336
impl EventLog<'_> {
337337
/// Iterator of events in the log.
338338
#[must_use]
339-
pub fn iter(&self) -> EventLogIter {
339+
pub fn iter(&self) -> EventLogIter<'_> {
340340
if let Some(header) = self.header() {
341341
// Advance past the header
342342
let location = unsafe { self.location.add(header.size_in_bytes) };
@@ -356,7 +356,7 @@ impl EventLog<'_> {
356356
}
357357

358358
/// Header at the beginning of the event log.
359-
fn header(&self) -> Option<EventLogHeader> {
359+
fn header(&self) -> Option<EventLogHeader<'_>> {
360360
// The spec is unclear if the header is present when there are
361361
// no entries, so lets assume that `self.location` will be null
362362
// if there's no header, and otherwise valid.
@@ -513,7 +513,7 @@ impl<'a> PcrEvent<'a> {
513513

514514
/// Digests of the data hashed for this event.
515515
#[must_use]
516-
pub fn digests(&self) -> PcrEventDigests {
516+
pub fn digests(&self) -> PcrEventDigests<'_> {
517517
PcrEventDigests {
518518
data: self.digests,
519519
algorithm_digest_sizes: self.algorithm_digest_sizes.clone(),
@@ -579,7 +579,7 @@ impl Tcg {
579579

580580
/// Get the V1 event log. This provides events in the same format as a V1
581581
/// TPM, so all events use SHA-1 hashes.
582-
pub fn get_event_log_v1(&mut self) -> Result<v1::EventLog> {
582+
pub fn get_event_log_v1(&mut self) -> Result<v1::EventLog<'_>> {
583583
let mut location = 0;
584584
let mut last_entry = 0;
585585
let mut truncated = 0;
@@ -608,7 +608,7 @@ impl Tcg {
608608
}
609609

610610
/// Get the V2 event log. This format allows for a flexible list of hash types.
611-
pub fn get_event_log_v2(&mut self) -> Result<EventLog> {
611+
pub fn get_event_log_v2(&mut self) -> Result<EventLog<'_>> {
612612
let mut location = 0;
613613
let mut last_entry = 0;
614614
let mut truncated = 0;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.