You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "suyanhanx (via GitHub)" <gi...@apache.org> on 2023/09/12 12:13:31 UTC

[GitHub] [incubator-opendal] suyanhanx commented on a diff in pull request #3038: refactor: Polish RangeWrite implementation to remove the extra buffer logic

suyanhanx commented on code in PR #3038:
URL: https://github.com/apache/incubator-opendal/pull/3038#discussion_r1322945835


##########
core/src/raw/oio/buf/chunked_bytes.rs:
##########
@@ -74,9 +76,9 @@ impl ChunkedBytes {
     /// Reference: <https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#impl-From%3CVec%3CT,+A%3E%3E-for-VecDeque%3CT,+A%3E>
     pub fn from_vec(bs: Vec<Bytes>) -> Self {
         Self {
+            size: bs.iter().map(|v| v.len()).sum(),

Review Comment:
   I thought it was strange here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org