Compiler error: removing an expression is not supported in this position

this line causes the compiler error:

removing an expression is not supported in this position

How can I get rid of the sent_time variable and it's assignments when the feature auto_resend is not active?

Something like this should work I think

                    #[cfg(feature = "auto_resend")]
                    {
                        sent_time = *last_time;
                    }
2 Likes

I thought we already provided a structured suggestion for the code @manpacket provided, but alas, we don't. We should fix that.

2 Likes