Skip to content
Discussion options

You must be logged in to vote

No, a Report cannot be cloned as the errors inside of Report don't necessarily implement Clone. This would require a bound T: Clone on any operation on Report (i.e. all contexts and attachments would need to be Cloneable) but it's very common that errors don't implement Clone. As a very prominent example, std::io::Error does not implement Clone. Adding a Clone bound would imply that many errors would not work with error-stack anymore.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@jrmoulton
Comment options

Answer selected by jrmoulton
Comment options

You must be logged in to vote
4 replies
@TimDiekmann
Comment options

@AriaFallah
Comment options

@TimDiekmann
Comment options

@AriaFallah
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/rejected This issue will not be worked on (previously "Won't Fix") area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area)
3 participants