Neo Mujico
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Ephera@lemmy.ml to Rust Programming@lemmy.mlEnglish · 4 months ago

When I have an Option<Result<T, E>> but need a Result<Option<T>, E>

lemmy.ml

external-link
message-square
2
fedilink
1
external-link

When I have an Option<Result<T, E>> but need a Result<Option<T>, E>

lemmy.ml

Ephera@lemmy.ml to Rust Programming@lemmy.mlEnglish · 4 months ago
message-square
2
fedilink
alert-triangle
You must log in or register to comment.
  • palebluethought@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    You see, a monad is like a burrito…

  • RustyNova@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    It’s super useful for TryStreams with next(). I often want to ? the result up, so that I can have a clean item in my while let loop

Rust Programming@lemmy.ml

rust@lemmy.ml

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@lemmy.ml
Visibility: Public
globe

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

  • 1 user / day
  • 1 user / week
  • 7 users / month
  • 32 users / 6 months
  • 0 local subscribers
  • 8.86K subscribers
  • 123 Posts
  • 144 Comments
  • Modlog
  • mods:
  • Nutomic@lemmy.ml
  • Joe@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org