Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

refactor!: avoid cloning storage prefixes #92

Closed mooori closed 1 year ago

mooori commented 1 year ago

Some functions that return storage prefixes returned Vec<u8> while &'static [u8] would suffice. This PR changes these functions to return the latter. This avoids unnecessary clones as pointed out in this external issue.

Breaking changes

The return type changes from Vec<u8> to &'static [u8] for

The bytes which are returned do not change.