I have a struct that I want to able to clone, Even though Clone is derived without any error, It fails when I try to call .clone() method.
My use case is being able to spawn without consuming self (I have tried borrowing but that lead to a lot of problems that I couldn't fix), I have also tried Arc but couldn't get it to work.
I'm new to Rust, So any help would be much appreciated!
derive(Clone) will include a where F: Clone bound on the impl it generates, because it's very simplistic and doesn't look into the struct's definition to see whether this bound is actually needed. This is issue #26925.
The solution is to write a manual Clone impl without that bound: