Open
Description
Context:
FWIU, the use of the unwrap()
call is discouraged, as it basically panics if the unwrapping operation fails. IMHO, it is great for quickly development and drafts, but it presents weak points in the application, which can crash at unexpected points. Below, is the output of git grep -c 'unwrap()'
:
src/lore_api_client.rs:1
src/lore_session.rs:6
src/main.rs:3
src/patch.rs:6
Proposal:
Handle as much as these unnecessary panics as possible. We should at least panic with a custom message... (at very very very least, use expect()
to convey a custom panic message)
Setup:
- Project branch: master
- Project commit hash: f810883
rustc
version: 1.79.0cargo
version: 1.79.0