Skip to content

SDK: make StorageMapAccess::get return Option<V> #673

@greenhat

Description

@greenhat

Defined at

fn get(&self, key: &K) -> V;
.

Why

The underlying storage::get_map_item returns zero word ([0, 0, 0, 0]) in case there is no value associated with the given key. Let's make get more in sync with idiomatic Rust.

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