-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The current code uses unwrap() and expect() more than it strictly needs to. A better approach would be to have the function return an error in these cases.
Specifically, the error type could be changed to be an enum with variants for:
- IO error, when the syscall fails
- Invalid UTF8
- Invalid Null Byte
- other error conditions we’re currently just panicking on
As this would change the error type, it would be a breaking change. However, if this was done correctly, a lot of the code where we currently use unwrap could just use “?”
Metadata
Metadata
Assignees
Labels
No labels