Aggregatet
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
monica_b1998@lemmy.world to Rust@programming.dev · 1 month ago

Error Handling in Rust vs. Exceptions in other languages

slicker.me

external-link
message-square
22
link
fedilink
34
external-link

Error Handling in Rust vs. Exceptions in other languages

slicker.me

monica_b1998@lemmy.world to Rust@programming.dev · 1 month ago
message-square
22
link
fedilink
Error Handling in Rust vs. Exceptions in Other Languages
slicker.me
external-link
  • calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    3
    ·
    1 month ago

    That’s what ? is for. If you have to do that manually, something is not working correctly.

    • treadful@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      1 month ago

      That only works if everything has the same error types.

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 month ago

        Or just implement Into for your error type. ? Works for Into

        • jenesaisquoi@feddit.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          Don’t implement Into, instead, implement From - and you’ll get Into for free

Rust@programming.dev

rust@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !rust@programming.dev

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 41 users / day
  • 162 users / week
  • 367 users / month
  • 1.08K users / 6 months
  • 2 local subscribers
  • 8.13K subscribers
  • 767 Posts
  • 3.19K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.19
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org