Skip to content

Commit

Permalink
resolvers: rename <F: AsFd> to Fd
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
  • Loading branch information
cyphar committed Dec 1, 2024
1 parent 158713f commit 4dec91f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/resolvers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ impl From<PartialLookup<Rc<OwnedFd>>> for PartialLookup<Handle> {
impl Resolver {
/// Internal dispatcher to the relevant backend.
#[inline]
pub(crate) fn resolve<F: AsFd, P: AsRef<Path>>(
pub(crate) fn resolve<Fd: AsFd, P: AsRef<Path>>(
&self,
root: F,
root: Fd,
path: P,
no_follow_trailing: bool,
) -> Result<Handle, Error> {
Expand All @@ -229,9 +229,9 @@ impl Resolver {
}

#[inline]
pub(crate) fn resolve_partial<F: AsFd, P: AsRef<Path>>(
pub(crate) fn resolve_partial<Fd: AsFd, P: AsRef<Path>>(
&self,
root: F,
root: Fd,
path: P,
no_follow_trailing: bool,
) -> Result<PartialLookup<Handle>, Error> {
Expand Down
8 changes: 4 additions & 4 deletions src/resolvers/openat2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use std::{
};

/// Resolve `path` within `root` through `openat2(2)`.
pub(crate) fn resolve<F: AsFd, P: AsRef<Path>>(
root: F,
pub(crate) fn resolve<Fd: AsFd, P: AsRef<Path>>(
root: Fd,
path: P,
rflags: ResolverFlags,
no_follow_trailing: bool,
Expand Down Expand Up @@ -89,8 +89,8 @@ pub(crate) fn resolve<F: AsFd, P: AsRef<Path>>(

/// Resolve as many components as possible in `path` within `root` using
/// `openat2(2)`.
pub(crate) fn resolve_partial<F: AsFd>(
root: F,
pub(crate) fn resolve_partial<Fd: AsFd>(
root: Fd,
path: &Path,
rflags: ResolverFlags,
no_follow_trailing: bool,
Expand Down
12 changes: 6 additions & 6 deletions src/resolvers/procfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ impl Default for ProcfsResolver {
}

impl ProcfsResolver {
pub(crate) fn resolve<F: AsFd, P: AsRef<Path>>(
pub(crate) fn resolve<Fd: AsFd, P: AsRef<Path>>(
&self,
root: F,
root: Fd,
path: P,
oflags: OpenFlags,
rflags: ResolverFlags,
Expand Down Expand Up @@ -99,8 +99,8 @@ impl ProcfsResolver {
/// [`openat2`][openat2.2]-based implementation of [`ProcfsResolver`].
///
/// [openat2.2]: https://www.man7.org/linux/man-pages/man2/openat2.2.html
fn openat2_resolve<F: AsFd, P: AsRef<Path>>(
root: F,
fn openat2_resolve<Fd: AsFd, P: AsRef<Path>>(
root: Fd,
path: P,
oflags: OpenFlags,
rflags: ResolverFlags,
Expand Down Expand Up @@ -135,8 +135,8 @@ fn openat2_resolve<F: AsFd, P: AsRef<Path>>(
}

/// `O_PATH`-based implementation of [`ProcfsResolver`].
fn opath_resolve<F: AsFd, P: AsRef<Path>>(
root: F,
fn opath_resolve<Fd: AsFd, P: AsRef<Path>>(
root: Fd,
path: P,
oflags: OpenFlags,
rflags: ResolverFlags,
Expand Down

0 comments on commit 4dec91f

Please sign in to comment.