Discarding return value, and ignoring return type
Discarding return value, and ignoring return type
Posted Sep 25, 2025 8:57 UTC (Thu) by taladar (subscriber, #68407)In reply to: Discarding return value, and ignoring return type by proski
Parent article: Canceling asynchronous Rust
Ignoring futures could be useful in unit tests where you only want to test the function creating the future in one test and the future itself in the next one.
Posted Sep 25, 2025 21:26 UTC (Thu)
by intgr (subscriber, #39733)
[Link]
Discarding return value, and ignoring return type
I think in that case writing `drop(create_future())` would make the intention clearer than assigning to _