Closed ayanko closed 4 years ago
Well, just to clarify, the lapper instance is sharable as is via references etc. Clone is not 'sharing' it's creation of a new thing. If I'm understanding Helix correctly, the struct implements clone, so all the fields of the struct must also implement clone. I'd verify that there is no way to do what you want to do without clone on Lapper first.
However, I pushed a new version with Lapper implementing Clone. Try v0.4.4 and see if that fixes it for you.
I'd verify that there is no way to do what you want to do without clone on Lapper first.
Well... After learning more docs I found the way. It's possible with this one:
https://doc.rust-lang.org/std/rc/
But anyway thank you for new release.
Reopen if you find any issues!
Hi,
How to share lapper instance? I am trying to pass lapper instance to to another structure but I have compilation error.
Code:
Error:
Is this due to missing
Clone
in macro on line https://github.com/sstadick/rust-lapper/blob/master/src/lib.rs#L92 ?How to fix it? Thank you in advance.