Skip to content

The inconsistency of init APIs #221

Open
@zhangwei983

Description

@zhangwei983

The init APIs of StableBTreeMap and StableVec returns inconsistent results:

  1. StableBTreeMap::init returns StableBTreeMap
  2. StableVec::init returns Result<StableVec, InitError>
    Actually MinHeap also returns a Result.

Looks like StableVec uses the safe_write method which returns a Result.

Should StableBTreeMap::init do the same thing and return a Result?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions