although there is no difference in the result between these two:
let chained_future = my_fut().and_then(|retval| my_fn_squared(retval));
let chained_future = my_fut().and_then(|retval| my_fut_squared(retval));
The signature is different:
futures::AndThen<impl futures::Future, std::result::Result<u32, std::boxed::Box<dyn std::error::Error>>, [closure@src/main.rs:25:45: 25:75]>
futures::AndThen<impl futures::Future, impl futures::Future, [closure@src/main.rs:30:45: 30:76]>
That said I think you are right, the code I used in the post is misleading. I will correct it right away!
Thank you very much,
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.