Skip to content

Commit

Permalink
Make impl trait a generic (#1317)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored Feb 8, 2025
1 parent 3cb6c90 commit 2f489cc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mount/mount_unmount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ use crate::{backend, io};
///
/// [Linux]: https://man7.org/linux/man-pages/man2/mount.2.html
#[inline]
pub fn mount<'a, Source: path::Arg, Target: path::Arg, Fs: path::Arg>(
pub fn mount<
'a,
Source: path::Arg,
Target: path::Arg,
Fs: path::Arg,
Data: Into<Option<&'a CStr>>,
>(
source: Source,
target: Target,
file_system_type: Fs,
flags: MountFlags,
data: impl Into<Option<&'a CStr>>,
data: Data,
) -> io::Result<()> {
source.into_with_c_str(|source| {
target.into_with_c_str(|target| {
Expand Down

0 comments on commit 2f489cc

Please sign in to comment.