aleo-setup icon indicating copy to clipboard operation
aleo-setup copied to clipboard

Refactor storage access logic to use only [Locator] instead of either [Locator] or [LocatorPath]

Open apruden2008 opened this issue 3 years ago • 3 comments

Round restart PR #288 uses a locator_or_path enum for removing chunks. In the future, this could be refactored using only the Locator struct. See inline comment: https://github.com/AleoHQ/aleo-setup/pull/288/files#r670566403

apruden2008 avatar Jul 15 '21 15:07 apruden2008

@kellpossible can you extrapolate on this if needed?

apruden2008 avatar Jul 15 '21 15:07 apruden2008

The code currently has an enum for working with both Locator and LocatorPath. There are parts of the code that the changes in #288 depend on that work with LocatorPath, these can probably be refactored to use Locator instead, rendering this LocatorOrPath enum redundant.

kellpossible avatar Jul 17 '21 13:07 kellpossible

Using Locator instead also has the benefit of being a bit more type safe

kellpossible avatar Jul 17 '21 13:07 kellpossible