🧰 Download pre-built binaries of all your favourite tools with a single command
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
Resolves #83
Refactored
ToolInfo.select_asset(&assets)
to return a customAssetError
error instead of a string and added tests for the function.The
AssetError
enum has two possible values:NameUnknown
: this is whenAssetName
does not know what the asset name is for a specific OS the user uses.NotFound
: this is when theAssetName
is not in theAssets
slice passed into theselect_asset(&assets)
method.Implemented
std::fmt::Display
trait forAssetError
and added tests for it.Additional tasks