Skip to content

Commit 30ea974

Browse files
committed
Fix argument order for copy* functions
1 parent abb4049 commit 30ea974

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl NixPath for [u8] {
9494
match self.position_elem(&0) {
9595
Some(_) => Err(Error::InvalidPath),
9696
None => {
97-
bytes::copy_memory(&mut buf, self);
97+
bytes::copy_memory(self, &mut buf);
9898
Ok(f(<OsStr as OsStrExt>::from_bytes(&buf[..self.len()])))
9999
}
100100
}

src/sys/socket/addr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ impl UnixAddr {
349349
}
350350

351351
ptr::copy(
352-
ret.sun_path.as_mut_ptr(),
353352
bytes.as_ptr() as *const i8,
353+
ret.sun_path.as_mut_ptr(),
354354
bytes.len());
355355

356356
Ok(UnixAddr(ret))

0 commit comments

Comments
 (0)