Currently we just unwrap a lot as a proof of concept, but a lot of things should not be unwrapped, particularly since a lot of bugs can be caused by non-fatal errors (e.g. a connection not being available or a snap's name not being in a certain query).
This is a breaking API change but oh well.
Note that some unwraps are valid - either we know for sure the unwrap is sound (e.g. check with is_none etc first) or we call expect because a flaw can only come from an internal error and needs to be fixed rather than reported to the user. These should stay.
This includes detecting and handling snapd's ErrorKind.
Currently we just
unwrapa lot as a proof of concept, but a lot of things should not beunwrapped, particularly since a lot of bugs can be caused by non-fatal errors (e.g. a connection not being available or a snap's name not being in a certain query).This is a breaking API change but oh well.
Note that some unwraps are valid - either we know for sure the
unwrapis sound (e.g. check withis_noneetc first) or we callexpectbecause a flaw can only come from an internal error and needs to be fixed rather than reported to the user. These should stay.This includes detecting and handling
snapd'sErrorKind.