Closed
Description
Compiling
#[deriving(Clone)]
enum ImageState {
Init,
Prefetching(AfterPrefetch),
Prefetched(@Cell<~[u8]>),
Decoding,
Decoded(@Arc<~Image>),
Failed
}
enum AfterPrefetch {
DoDecode,
DoNotDecode
}
produces
error: mismatched types: expected `image_cache_task::AfterPrefetch` but found `&image_cache_task::AfterPrefetch` (expected enum image_cache_task::AfterPrefetch but found &-ptr)
#[deriving(Clone)]
^~~~~
The solution is just to derive Clone
on AfterPrefetch
as well. But the error message is not helpful.
Metadata
Metadata
Assignees
Labels
No labels