• txmyx
    link
    fedilink
    arrow-up
    7
    arrow-down
    3
    ·
    7 months ago

    I don’t like the rust way either. But at least you can unwrap

    • TheEntity@lemmy.world
      link
      fedilink
      arrow-up
      21
      arrow-down
      1
      ·
      7 months ago

      With some sprinkle of libraries such as anyhow and thiserror the Rust errors become actually pleasant to use. The vanilla way is indeed painful when you start handling more than one type of error at a time.

      • Fal@yiffit.net
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        7 months ago

        Exactly this. Anyhow makes error handling in rust actually a joy. It’s only something you need to consider if you’re writing a library for others to use, and in that case, it’s good that rust forces you to be very very explicit