Closed
Description
I'm having some troubles with Clone
for a function type.
I'm using the following function in my code:
fn(&Request, &mut ResponseWriter) -> Box<Action>
and it apparently doesn't implement Clone
, nor can I implement Clone
for it.
This is the code that I'm using to test: http://is.gd/3cm94D
and the output I get when trying to compile code which requires the function to be Clone
able:
<anon>:20:5: 20:35 error: failed to find an implementation of trait core::clone::Clone for fn(&Request, &mut ResponseWriter) -> Box<Action>
<anon>:20 routes: Router<RequestHandler>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in expansion of #[deriving]
<anon>:18:1: 19:7 note: expansion site
@Kimundi on irc suggested the following code: http://is.gd/WJCznj which works for this specific test case, but requires a lot of other changes in my code that I haven't been to get working yet.