From a732b224f7e0ef25ac4015d0997d4d772be7c24e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 15 Dec 2021 02:31:53 -0500 Subject: be less aggressive --- src/pty/tokio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pty/tokio.rs') 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)), -- cgit v1.2.3-54-g00ecf