aboutsummaryrefslogtreecommitdiff
path: root/src/buf/chain.rs
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-12-08 09:42:43 +0100
committerJeff Vander Stoep <jeffv@google.com>2022-12-08 09:48:48 +0100
commit61e66a44bc92c925ada24e2765572e5de1b827fe (patch)
treef076aa0469c4503eed1329b45d8a42af241ffb3b /src/buf/chain.rs
parenta8cac4dbb79bd0c8317dc7e8442cd02578df10ca (diff)
downloadbytes-61e66a44bc92c925ada24e2765572e5de1b827fe.tar.gz
Upgrade bytes to 1.3.0
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/bytes For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Ifc6693cab6343ed5bcd70b718bb4b99c447783ea
Diffstat (limited to 'src/buf/chain.rs')
-rw-r--r--src/buf/chain.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/buf/chain.rs b/src/buf/chain.rs
index 9ce5f23..78979a1 100644
--- a/src/buf/chain.rs
+++ b/src/buf/chain.rs
@@ -198,8 +198,7 @@ where
fn remaining_mut(&self) -> usize {
self.a
.remaining_mut()
- .checked_add(self.b.remaining_mut())
- .unwrap()
+ .saturating_add(self.b.remaining_mut())
}
fn chunk_mut(&mut self) -> &mut UninitSlice {