38
you are viewing a single comment's thread
view the rest of the comments
[-] calcopiritus@lemmy.world 8 points 1 year ago* (last edited 1 year ago)

Well, the closure has a type. Just you cannot declare it. That's why you do "impl Fn" instead. Because you know that whatever type the close is, it implements the "Fn" trait.

this post was submitted on 11 Sep 2025
38 points (97.5% liked)

Rust

8375 readers
64 users here now

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)

founded 3 years ago
MODERATORS