chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

[#83] Create 'AssetError' and refactor 'select_asset' function to return it #97

Closed zixuan-x closed 1 year ago

zixuan-x commented 1 year ago

Resolves #83

Refactored ToolInfo.select_asset(&assets) to return a custom AssetError error instead of a string and added tests for the function.

The AssetError enum has two possible values:

Implemented std::fmt::Display trait for AssetError and added tests for it.

Additional tasks