Re: [rust-dev] Mutability and borrowing

2013-06-02 Thread Daniel Micay
On Sun, Jun 2, 2013 at 12:33 AM, Ziad Hatahet hata...@gmail.com wrote: I have the following function: fn add_equal(x: mut Complex, y: Complex) { x.real += y.real; x.imag += y.imag; } Calling the function with the same variable being passed to both arguments (i.e. add_equal(mut c,

Re: [rust-dev] Mutability and borrowing

2013-06-02 Thread Ziad Hatahet
On Sun, Jun 2, 2013 at 6:56 AM, Daniel Micay danielmi...@gmail.com wrote: You can currently use `const Complex` for the second parameter, but it may or may not be removed in the future. At the very least it will probably be renamed. Excellent. Thanks all for your replies :) -- Ziad

Re: [rust-dev] Scheduler and I/O work items for the summer

2013-06-02 Thread Brian Anderson
On 06/01/2013 12:08 AM, Vadim wrote: On Fri, May 31, 2013 at 3:45 PM, Brian Anderson bander...@mozilla.com mailto:bander...@mozilla.com wrote: With this problem in general I think the obvious solutions amount to taking one of two approaches: translate I/O events into pipe

Re: [rust-dev] Scheduler and I/O work items for the summer

2013-06-02 Thread Brian Anderson
On 06/01/2013 11:49 PM, Matthieu Monrocq wrote: On Sat, Jun 1, 2013 at 8:35 PM, Vadim vadi...@gmail.com mailto:vadi...@gmail.com wrote: On Sat, Jun 1, 2013 at 7:47 AM, Matthieu Monrocq matthieu.monr...@gmail.com mailto:matthieu.monr...@gmail.com wrote: 1.

Re: [rust-dev] Scheduler and I/O work items for the summer

2013-06-02 Thread Brian Anderson
On 06/02/2013 03:44 PM, Brian Anderson wrote: On 06/01/2013 11:49 PM, Matthieu Monrocq wrote: On Sat, Jun 1, 2013 at 8:35 PM, Vadim vadi...@gmail.com mailto:vadi...@gmail.com wrote: On Sat, Jun 1, 2013 at 7:47 AM, Matthieu Monrocq matthieu.monr...@gmail.com

Re: [rust-dev] Traits mod

2013-06-02 Thread Sanghyeon Seo
This is fixed by adding use some_mod::SomeTrait at the start of some_use.rs. It's as though traits need to be in the same scope as code that expects to make use of their behaviour (where I'd expect the behaviour would be associated with the implementation for the self type). My question is: