summaryrefslogtreecommitdiffstats
path: root/src/tty.rs
diff options
context:
space:
mode:
authorEli W. Hunter <42009212+elihunter173@users.noreply.github.com>2021-02-20 19:36:31 -0500
committerGitHub <noreply@github.com>2021-02-20 19:36:31 -0500
commit9c72d3aacb675c5bcff238ce4996dbbe138e11c8 (patch)
tree692b95faa1a8226a6c29efe1f349ae999eddc735 /src/tty.rs
parent5af822c5691a772cad36bd9a69e94419b03d4511 (diff)
Fix lifetimes (#272)
* Some changes * Clarify lifetimes in transport.rs * Fix remaining easy lifetimes in lib.rs * Refactor Images::build for new lifetimes to work * Fix Exec::start() * Fix Container::exec() * Make header_bytes not a Vec * Make Docker::{images,...}() lifetimes explicit * Fix Containers::get() * Remove unnecessary locals from examples * Update changelog * Appease clippy
Diffstat (limited to 'src/tty.rs')
-rw-r--r--src/tty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tty.rs b/src/tty.rs
index 67c72bd..b4232ad 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -53,7 +53,7 @@ async fn decode_chunk<S>(mut stream: S) -> Option<(Result<TtyChunk>, S)>
where
S: AsyncRead + Unpin,
{
- let mut header_bytes = vec![0u8; 8];
+ let mut header_bytes = [0u8; 8];
match stream.read_exact(&mut header_bytes).await {
Err(e) if e.kind() == futures_util::io::ErrorKind::UnexpectedEof => return None,