x4121 / fastsar-rs

A small program to switch between AWS Roles quickly using fuzzy matching
MIT License
2 stars 2 forks source link

Apply minor refactoring to fuse intermediate passes #15

Closed rvarago closed 2 years ago

rvarago commented 2 years ago

This PR applies a couple of minor refactoring, e.g. to avoid unnecessary references and allocations, and re-express the usage of a couple of combinators to elide intermediate iterations and/or shorten pipelines.

Hopefully, I haven't gone too far with piping to the point of obscuring the underlying logic :see_no_evil:, I'd be keen to know your thoughts.

IMPORTANT: Ideally, there shall be no behaviour change. However, I have not had the time to test it all thoroughly yet.