zesterer / ariadne

A fancy diagnostics & error reporting crate
https://crates.io/crates/ariadne
MIT License
1.69k stars 74 forks source link

Implement `clone` on `ReportBuilder` #16

Open cswinter opened 2 years ago

cswinter commented 2 years ago

Fixes https://github.com/zesterer/ariadne/issues/15

zesterer commented 2 years ago

Thanks!

zesterer commented 2 years ago

Looks like there's a bit more to do on this PR: adding a few Clone constraints in derives. It's likely going to be a breaking change.

mxthevs commented 2 years ago

What is the status of this PR? I would love to have a clone method both on ReportBuilder and Report :)

zesterer commented 2 years ago

It looks like it just needs someone to pick it up again.

TornaxO7 commented 2 years ago

I looked a little bit, if I can pick this PR, but when I saw this, I was a little unsure what the best approach would be.

zesterer commented 2 years ago

The comment in that file only really relates to the logic for actually generating a diagnostic. Implementing Clone for ReportBuilder is just a case of writing a manual Clone impl with the correct bounds.