[rust-dev] On Copy = POD

Paulo Sérgio Almeida pssalmeida at gmail.com
Sun Jun 22 13:26:33 PDT 2014


On 21 June 2014 22:03, Igor Bukanov <igor at mir2.org> wrote:

> On 20 June 2014 21:07, Paulo Sérgio Almeida <pssalmeida at gmail.com> wrote:
> > I have seen many other examples, where the code could mislead the reader
> into
> > thinking there are several, e.g., Mutexes:
> >
> > let mutex = Arc::new(Mutex::new(1));
> > let mutex2 = mutex.clone();
>
> Does this experience exist outside multithreaded code? I am asking
> because if the need to use extra temporary to create clones is limited
> mostly to cases involving implementations of Send, then this is rather
> different case than the issue of avoiding explicit clone() in general.
>

I don't know, I don't have real experience writing Rust. Have only been
looking at examples, mostly from the docs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140622/68af524c/attachment.html>


More information about the Rust-dev mailing list