Refactor to use TryFrom #85
Labels
contrib/easy
Contributing: this issue likely requires less time or experience than other issues.
contrib/good first issue
Contributing: this issue would make a good starting point for a first-time contributor.
kind/refactor
Kind: this issue describes refactoring or code quality improvement.
Since the
TryFrom
trait is in unstable Rust (rust-lang/rust#33417), we should rewrite a lot of failable conversions intoTryFrom
implementations. 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_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.The text was updated successfully, but these errors were encountered: