projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.05k stars 95 forks source link

Implemented Clone for AST nodes #185

Closed Michael-F-Bryan closed 3 years ago

Michael-F-Bryan commented 4 years ago

When implementing the code for rewriting parts of an AST, I noticed none of the AST types implement Clone.

Not having the impl means f you don't need to update a node and just want a copy of it, you have to implement the clone logic yourself instead of just writing node.clone(),

Is there any major reason why we don't #[derive(Clone)]?

zbraniecki commented 3 years ago

I incorporated it into https://github.com/projectfluent/fluent-rs/pull/198