Skip to content

Commit 16e801d

Browse files
committed
unistd: allow linkat to take multiple path types
Other places in the crate take independent types in use cases like this, so bring `linkat` into line with them. Signed-off-by: Hank Donnay <[email protected]>
1 parent 34bb802 commit 16e801d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/unistd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,11 +1577,11 @@ impl LinkatFlags {
15771577
/// # References
15781578
/// See also [linkat(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html)
15791579
#[cfg(not(target_os = "redox"))] // Redox does not have this yet
1580-
pub fn linkat<Fd1: std::os::fd::AsFd, Fd2: std::os::fd::AsFd, P: ?Sized + NixPath>(
1580+
pub fn linkat<Fd1: std::os::fd::AsFd, Fd2: std::os::fd::AsFd, P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
15811581
olddirfd: Fd1,
1582-
oldpath: &P,
1582+
oldpath: &P1,
15831583
newdirfd: Fd2,
1584-
newpath: &P,
1584+
newpath: &P2,
15851585
flag: AtFlags,
15861586
) -> Result<()> {
15871587
use std::os::fd::AsRawFd;

0 commit comments

Comments
 (0)