|
86 | 86 | /// - `source` - source handle
|
87 | 87 | /// - `dest` - destination handle
|
88 | 88 | #[inline]
|
89 |
| -fn splice_write<R, S>(source: &R, dest: &S) -> UResult<(u64, bool)> |
| 89 | +pub(crate) fn splice_write<R, S>(source: &R, dest: &S) -> UResult<(u64, bool)> |
90 | 90 | where
|
91 | 91 | R: Read + AsFd + AsRawFd,
|
92 | 92 | S: AsRawFd + AsFd,
|
@@ -122,7 +122,11 @@ where
|
122 | 122 | /// Move exactly `num_bytes` bytes from `read_fd` to `write_fd` using the `read`
|
123 | 123 | /// and `write` calls.
|
124 | 124 | #[cfg(any(target_os = "linux", target_os = "android"))]
|
125 |
| -fn copy_exact(read_fd: RawFd, write_fd: &impl AsFd, num_bytes: usize) -> std::io::Result<usize> { |
| 125 | +pub(crate) fn copy_exact( |
| 126 | + read_fd: RawFd, |
| 127 | + write_fd: &impl AsFd, |
| 128 | + num_bytes: usize, |
| 129 | +) -> std::io::Result<usize> { |
126 | 130 | use nix::unistd;
|
127 | 131 |
|
128 | 132 | let mut left = num_bytes;
|
@@ -247,7 +251,7 @@ where
|
247 | 251 | /// Result with tuple containing a `u64` `0` indicating that no data had been
|
248 | 252 | /// written and a `true` indicating we have to fall back, if error is still
|
249 | 253 | /// recoverable. Returns an `Error` implementing `UError` otherwise.
|
250 |
| -fn maybe_unsupported(error: nix::Error) -> Result<(u64, bool)> { |
| 254 | +pub(crate) fn maybe_unsupported(error: nix::Error) -> Result<(u64, bool)> { |
251 | 255 | match error {
|
252 | 256 | Errno::EINVAL | Errno::ENOSYS | Errno::EBADF => Ok((0, true)),
|
253 | 257 | _ => Err(error.into()),
|
|
0 commit comments