[rust-dev] On Copy = POD

Igor Bukanov igor at mir2.org
Sat Jun 21 14:03:24 PDT 2014


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.


More information about the Rust-dev mailing list