Lemmy Today
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
snaggen@programming.dev to Rust@programming.devEnglish ·
edit-2
2 years ago

The ???? operator

programming.dev

message-square
26
link
fedilink
188

The ???? operator

programming.dev

snaggen@programming.dev to Rust@programming.devEnglish ·
edit-2
2 years ago
message-square
26
link
fedilink

I found this funny.

The context is as explained by @laund@hachyderm.io

the issue is that you can’t return from inside a closure, since the closure might be called later/elsewhere

and this post was the asnwer to the question by @antonok@fosstodon.org

you got me curious what the record for the longest ? operator chain on crates.io is

Original post: https://fosstodon.org/users/antonok/statuses/111134824451525448

  • Turun@feddit.de
    link
    fedilink
    arrow-up
    16
    ·
    2 years ago

    I never though about chaining ?! This is hilarious and I need to use it somewhere now.

    • rem26_art@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      yeah i didnt realize you could do that either lmao.

      • Turun@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        2 years ago

        It make total sense, I just never ran into a Result(Result(Result(T, E), E), E) situation

        Edit: Lemmy is so scared of cross site scripting, they simply remove all less than and greater than signs, lmao

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          And it replaces ampersands.

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.

  • 40 users / day
  • 179 users / week
  • 392 users / month
  • 2.86K users / 6 months
  • 23 local subscribers
  • 6.92K subscribers
  • 959 Posts
  • 4.61K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org