bee icon indicating copy to clipboard operation
bee copied to clipboard

Do access operations in `bee-storage` using an extension trait

Open pvdrz opened this issue 2 years ago • 0 comments

The idea of this PR is avoiding the classical Access::<K, V>::access(storage, args) syntax call everywhere by creating a new trait that has a fn access<K, V>(&self, args) method for every Access trait.

This means that we need to write less code to do access operations and import less traits. Sadly this isn't reflected in the line count because rustfmt is not able to split Bar::bar(&foo, args) but it is able to split foo.bar(args).

pvdrz avatar May 18 '22 21:05 pvdrz