Skip to content

Commit 48abc68

Browse files
committed
lattice: add new clone method
1 parent 134d964 commit 48abc68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ impl PyLattice {
272272
pub fn scale_by_c(&mut self, v: f64) {
273273
self.inner.scale_by_c(v)
274274
}
275+
276+
/// Create a new copy of `Lattice`.
277+
pub fn clone(&self) -> Self {
278+
let inner = self.inner.clone();
279+
Self { inner }
280+
}
275281
}
276282
// c8807c91 ends here
277283

0 commit comments

Comments
 (0)