You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's 419 methods in a single type. The type is bloated. Because of this it's hard to debug and navigate the code. A lot of these methods used just to access storage. Take, for example Pallet::get_active here is its code:
This method can be safely removed and it's no shorter than just using the storage directly.
Describe the solution you'd like
The best way to clear everything up would be providing a script, which could analyze the usage of Pallet's methods within the codebase. rustdoc and rust-analyzer could be leveraged for this.
The getters/setters for storage, should be replaced with storage API.
Is your feature request related to a problem? Please describe.
Here is the list of methods of
Pallet
type:It's 419 methods in a single type. The type is bloated. Because of this it's hard to debug and navigate the code. A lot of these methods used just to access storage. Take, for example
Pallet::get_active
here is its code:And there is only one place where it's used:
This method can be safely removed and it's no shorter than just using the storage directly.
Describe the solution you'd like
Pallet
's methods within the codebase.rustdoc
andrust-analyzer
could be leveraged for this.Pallet
type doesn't need.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: