ITADN

Encapsulate return type with `Option` enum instead of panicking

#49Pull RequestSapphirusBeryl 创建于 2024-09-21
S
SapphirusBerylcommented
It's possible for libalpm to return valid errors without a pointer. Therefore change the return type for the `data()` function in the `PrepareError` and `CommitError` structs to be encapsulated within an `Option` enum in order to prevent a fatal panic, instead returning `None` when an error is unhandled and thus contains no data.
合并状态:未合并 关闭于 2025-01-03 1 条评论