Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
ion
ion
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • redox-os
  • ionion
  • Issues
  • #997

Closed
Open
Opened Jan 10, 2021 by Nathaniel Barragan@NateDogg1232Contributor

Replace err-derive with thiserror

The err-derive crate is now depreciated, and the author currently recommends moving to thiserror

Some info:

Currently, the error dervies that use err-derive take up about 149 lines of code. thiserror although not a drop-in replacement is close to it, and it shouldn't be too difficult to transfer over.

Info on switching over from err-derive that I've found out

#[derive(Error) still works as normal

An example of something that needs to change is any #[error(display = "whatever")] lines. This actually becomes easier with it looking like #[error("whatever")]. Any sort of fields that are needed from the struct or tuple are done very similarly.

More information on thiserror can be found on docs.rs here. I recommend we just base on "1.0" and let any minor versions update as needed.

Edited Jan 10, 2021 by Nathaniel Barragan
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: redox-os/ion#997