From 4dec91fef908a11f59f8fc58abd97e37c915f3c3 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 30 Nov 2024 20:32:30 +1100 Subject: [PATCH] resolvers: rename to Fd Signed-off-by: Aleksa Sarai --- src/resolvers.rs | 8 ++++---- src/resolvers/openat2.rs | 8 ++++---- src/resolvers/procfs.rs | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/resolvers.rs b/src/resolvers.rs index 9e88bca5..b2ffe6b9 100644 --- a/src/resolvers.rs +++ b/src/resolvers.rs @@ -212,9 +212,9 @@ impl From>> for PartialLookup { impl Resolver { /// Internal dispatcher to the relevant backend. #[inline] - pub(crate) fn resolve>( + pub(crate) fn resolve>( &self, - root: F, + root: Fd, path: P, no_follow_trailing: bool, ) -> Result { @@ -229,9 +229,9 @@ impl Resolver { } #[inline] - pub(crate) fn resolve_partial>( + pub(crate) fn resolve_partial>( &self, - root: F, + root: Fd, path: P, no_follow_trailing: bool, ) -> Result, Error> { diff --git a/src/resolvers/openat2.rs b/src/resolvers/openat2.rs index 11293895..c8cdc5b1 100644 --- a/src/resolvers/openat2.rs +++ b/src/resolvers/openat2.rs @@ -32,8 +32,8 @@ use std::{ }; /// Resolve `path` within `root` through `openat2(2)`. -pub(crate) fn resolve>( - root: F, +pub(crate) fn resolve>( + root: Fd, path: P, rflags: ResolverFlags, no_follow_trailing: bool, @@ -89,8 +89,8 @@ pub(crate) fn resolve>( /// Resolve as many components as possible in `path` within `root` using /// `openat2(2)`. -pub(crate) fn resolve_partial( - root: F, +pub(crate) fn resolve_partial( + root: Fd, path: &Path, rflags: ResolverFlags, no_follow_trailing: bool, diff --git a/src/resolvers/procfs.rs b/src/resolvers/procfs.rs index 76819c80..7ffeaf9e 100644 --- a/src/resolvers/procfs.rs +++ b/src/resolvers/procfs.rs @@ -67,9 +67,9 @@ impl Default for ProcfsResolver { } impl ProcfsResolver { - pub(crate) fn resolve>( + pub(crate) fn resolve>( &self, - root: F, + root: Fd, path: P, oflags: OpenFlags, rflags: ResolverFlags, @@ -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>( - root: F, +fn openat2_resolve>( + root: Fd, path: P, oflags: OpenFlags, rflags: ResolverFlags, @@ -135,8 +135,8 @@ fn openat2_resolve>( } /// `O_PATH`-based implementation of [`ProcfsResolver`]. -fn opath_resolve>( - root: F, +fn opath_resolve>( + root: Fd, path: P, oflags: OpenFlags, rflags: ResolverFlags,