Skip to content

Remove DataSlice structure in Blob backend implementation #12249

Closed

Description

@izgzhen

During the PR #11875, it is found that DataSlice is not very useful anymore because in most cases, the user of BlobImpl::new_from_slice simply initializes DataSlice with a vector of bytes without specifying the start and end boundaries.

Thus we can simplify the design here and make BlobImpl::Memory holding only a Vec<u8> and let further slicing only be done through the Blob::Slice interface. Another good thing about this is that we can also simplify Blob::promote_to_file (by not doing RelativePos::from_abs_range anymore).

Supplementary info: where DataSlice is used.

Activity

  1. izgzhen commented on Jul 5, 2016

    @izgzhen
    ContributorAuthor
  2. added
    C-assigned
    on Jul 5, 2016
  3. added a commit that references this issue on Jul 5, 2016
    87c7772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions