Since the TryFrom trait is in unstable Rust (rust-lang/rust#33417), we should rewrite a lot of failable conversions into TryFrom implementations. For example, a lot of the ELF parsing code that returns Result<Self, ElfError> can probably be rewritten to use TryFrom.
Where removing existing failable conversion methods would break a lot of other code, we can temporarily preserve the existing API by having it wrap a try_from call, and phase it out gradually.
We don't have to worry about TryFrom not being on stable, since we can't build SOS on stable anyway.
Since the
TryFromtrait is in unstable Rust (rust-lang/rust#33417), we should rewrite a lot of failable conversions intoTryFromimplementations. For example, a lot of the ELF parsing code that returnsResult<Self, ElfError>can probably be rewritten to useTryFrom.Where removing existing failable conversion methods would break a lot of other code, we can temporarily preserve the existing API by having it wrap a
try_fromcall, and phase it out gradually.We don't have to worry about
TryFromnot being on stable, since we can't build SOS on stable anyway.