I am trying to create a function that has a closure that has a fixed argument, but can return any error type.
Problem is Box<dyn Error> doesn't implement Error and instead delegates to dyn Error which is ?Sized.
See playground:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=e0420d394f32875319a2762ad393e376
Are there any solutions to this?
A browser interface to the Rust compiler to experiment with the language