Updated to rust 0.6.

Here is my quick port to rust 0.6.
Note that I am still very much learning rust and that I started with rust 0.6 so I might have missed some subtleties.