bee
bee copied to clipboard
Do access operations in `bee-storage` using an extension trait
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)
.