Is there a way to negate an Option<bool>?

Viewed 646

I'm facing a provided function that takes an Into<Option<bool>> as a parameter but I want to pass it the opposite value of my current bool.

1 Answers

Have you tried opt.map(|b| !b)?

Related