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

Avoid clones in `AccessControllable` #38

Open mooori opened 1 year ago

mooori commented 1 year ago

The migration from near_sdk::collections to near_sdk::store introduced new clones in the AccessControllable plugin. Some of them can be avoided by changing the signatures of internal functions.

mooori commented 1 year ago

As pointed out in this comment, more optimisations might be possible by changing signatures of AccessControllable trait methods. As of now, they are frequently using owned types instead of references.