aboutsummaryrefslogtreecommitdiffstats
path: root/src/pty/tokio.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-15 02:31:53 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-15 02:31:53 -0500
commita732b224f7e0ef25ac4015d0997d4d772be7c24e (patch)
treea5afd2c554d00c6655aeb6e43e7eb87897a266bf /src/pty/tokio.rs
parent38070766d15c44c3d731aa5b231e3b2ad698ac05 (diff)
downloadpty-process-a732b224f7e0ef25ac4015d0997d4d772be7c24e.tar.gz
pty-process-a732b224f7e0ef25ac4015d0997d4d772be7c24e.zip
be less aggressive
Diffstat (limited to 'src/pty/tokio.rs')
-rw-r--r--src/pty/tokio.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pty/tokio.rs b/src/pty/tokio.rs
index 573d73b..e11bffb 100644
--- a/src/pty/tokio.rs
+++ b/src/pty/tokio.rs
@@ -46,7 +46,7 @@ impl tokio::io::AsyncRead for AsyncPty {
buf.clear();
buf.initialize_unfilled_to(bytes);
buf.set_filled(bytes);
- buf.filled_mut().copy_from_slice(b.get(..bytes).unwrap());
+ buf.filled_mut().copy_from_slice(&b[..bytes]);
return std::task::Poll::Ready(Ok(()));
}
Ok(Err(e)) => return std::task::Poll::Ready(Err(e)),