aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_put.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-29 17:06:55 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-29 17:07:14 +0100
commitd54f15b2c6794eacee82d3900c50dbfb086f8c79 (patch)
tree26d1b91c922fa1c22edf506b1388e83506af6fcb /src/api/s3_put.rs
parent3f18aa6f1def52d61a4fc3bbb667d1f0911665ed (diff)
downloadgarage-d54f15b2c6794eacee82d3900c50dbfb086f8c79.tar.gz
garage-d54f15b2c6794eacee82d3900c50dbfb086f8c79.zip
Small optimisation
Diffstat (limited to 'src/api/s3_put.rs')
-rw-r--r--src/api/s3_put.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/s3_put.rs b/src/api/s3_put.rs
index 09c3cdbe..9c4d625c 100644
--- a/src/api/s3_put.rs
+++ b/src/api/s3_put.rs
@@ -248,7 +248,7 @@ impl BodyChunker {
body,
read_all: false,
block_size,
- buf: VecDeque::new(),
+ buf: VecDeque::with_capacity(2 * block_size),
}
}
async fn next(&mut self) -> Result<Option<Vec<u8>>, GarageError> {