Skip to content

Use Buffer as cache in MultipartWrite #4455

Closed

Description

@Xuanwo

MultipartWrite uses Bytes as cache:

fn fill_cache(&mut self, bs: Bytes) -> usize {
let size = bs.len();
assert!(self.cache.is_none());
self.cache = Some(bs);
size
}

We should replace it with Buffer instead to avoid extra copy.

Activity

  1. added
    good first issue
    help wanted
    on Apr 9, 2024
  2. self-assigned this
    on Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coregood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions