Skip to content

Commit 16b932e

Browse files
authored
Merge pull request #1497 from jeckersb/mismatched_lifetime_syntaxes
Fix warnings for `mismatched_lifetime_syntaxes` lint
2 parents acba07b + b133b39 commit 16b932e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

crates/lib/src/parsers/grub_menuconfig.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub fn take_until_balanced_allow_nested(
142142

143143
/// Parses a single menuentry with title and body commands.
144144
#[allow(dead_code)]
145-
fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry> {
145+
fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry<'_>> {
146146
let (input, _) = tag("menuentry").parse(input)?;
147147

148148
// Require at least one space after "menuentry"
@@ -198,7 +198,7 @@ fn skip_to_menuentry(input: &str) -> IResult<&str, ()> {
198198

199199
/// Parses all menuentries from a GRUB configuration file.
200200
#[allow(dead_code)]
201-
fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry>> {
201+
fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry<'_>>> {
202202
let mut remaining = input;
203203
let mut entries = Vec::new();
204204

@@ -230,7 +230,7 @@ fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry>> {
230230

231231
/// Main entry point for parsing GRUB menuentry files.
232232
#[allow(dead_code)]
233-
pub(crate) fn parse_grub_menuentry_file(contents: &str) -> anyhow::Result<Vec<MenuEntry>> {
233+
pub(crate) fn parse_grub_menuentry_file(contents: &str) -> anyhow::Result<Vec<MenuEntry<'_>>> {
234234
let (_, entries) = parse_all(&contents)
235235
.map_err(|e| anyhow::anyhow!("Failed to parse GRUB menuentries: {e}"))?;
236236
// Validate that entries have reasonable structure

crates/lib/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(crate) fn origin_has_rpmostree_stuff(kf: &glib::KeyFile) -> bool {
3232

3333
// Access the file descriptor for a sysroot
3434
#[allow(unsafe_code)]
35-
pub(crate) fn sysroot_fd(sysroot: &ostree::Sysroot) -> BorrowedFd {
35+
pub(crate) fn sysroot_fd(sysroot: &ostree::Sysroot) -> BorrowedFd<'_> {
3636
unsafe { BorrowedFd::borrow_raw(sysroot.fd()) }
3737
}
3838

crates/ostree-ext/src/container/deploy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct DeployOpts<'a> {
5656
// Access the file descriptor for a sysroot
5757
#[allow(unsafe_code)]
5858
#[cfg(feature = "bootc")]
59-
pub(crate) fn sysroot_fd(sysroot: &ostree::Sysroot) -> BorrowedFd {
59+
pub(crate) fn sysroot_fd(sysroot: &ostree::Sysroot) -> BorrowedFd<'_> {
6060
unsafe { BorrowedFd::borrow_raw(sysroot.fd()) }
6161
}
6262

crates/ostree-ext/src/fixture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ fn ensure_parent_dirs(
340340
.map_err(Into::into)
341341
}
342342

343-
fn relative_path_components(p: &Utf8Path) -> impl Iterator<Item = Utf8Component> {
343+
fn relative_path_components(p: &Utf8Path) -> impl Iterator<Item = Utf8Component<'_>> {
344344
p.components()
345345
.filter(|p| matches!(p, Utf8Component::Normal(_)))
346346
}

crates/ostree-ext/src/tar/export.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ fn map_path_inner<'p>(
7575
}
7676

7777
/// Convert /usr/etc back to /etc
78-
fn map_path(p: &Utf8Path) -> std::borrow::Cow<Utf8Path> {
78+
fn map_path(p: &Utf8Path) -> std::borrow::Cow<'_, Utf8Path> {
7979
map_path_inner(p, "./usr/etc", "./etc")
8080
}
8181

8282
/// Convert etc to usr/etc
8383
/// Note: no leading '/' or './'
84-
fn unmap_path(p: &Utf8Path) -> std::borrow::Cow<Utf8Path> {
84+
fn unmap_path(p: &Utf8Path) -> std::borrow::Cow<'_, Utf8Path> {
8585
map_path_inner(p, "etc", "usr/etc")
8686
}
8787

crates/ostree-ext/src/tar/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub(crate) struct TarImportConfig {
142142
}
143143

144144
// If a path starts with /etc or ./etc or etc, remap it to be usr/etc.
145-
fn remap_etc_path(path: &Utf8Path) -> Cow<Utf8Path> {
145+
fn remap_etc_path(path: &Utf8Path) -> Cow<'_, Utf8Path> {
146146
let mut components = path.components();
147147
let Some(prefix) = components.next() else {
148148
return Cow::Borrowed(path);

0 commit comments

Comments
 (0)