We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abb4049 commit 30ea974Copy full SHA for 30ea974
src/lib.rs
@@ -94,7 +94,7 @@ impl NixPath for [u8] {
94
match self.position_elem(&0) {
95
Some(_) => Err(Error::InvalidPath),
96
None => {
97
- bytes::copy_memory(&mut buf, self);
+ bytes::copy_memory(self, &mut buf);
98
Ok(f(<OsStr as OsStrExt>::from_bytes(&buf[..self.len()])))
99
}
100
src/sys/socket/addr.rs
@@ -349,8 +349,8 @@ impl UnixAddr {
349
350
351
ptr::copy(
352
- ret.sun_path.as_mut_ptr(),
353
bytes.as_ptr() as *const i8,
+ ret.sun_path.as_mut_ptr(),
354
bytes.len());
355
356
Ok(UnixAddr(ret))
0 commit comments