Lemmy
  • 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
25
fedilink
182

The ???? operator

programming.dev

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

I found this funny.

The context is as explained by @[email protected]

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 @[email protected]

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
        ·
        2 years ago

        It make total sense, I just never ran into a Result, E>, E> situation

        • 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: [email protected]

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

Wormhole

[email protected]

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.

  • 1 user / day
  • 56 users / week
  • 390 users / month
  • 2.88K users / 6 months
  • 1 local subscriber
  • 7.15K subscribers
  • 1K Posts
  • 4.48K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org