update the code to match the last rust version 

All tests succeed.
This is my first pull request so please give me your feedback.

( rustc 0.13.0-nightly (126db549b 2014-12-15 00:07:35 +0000) )

( Sorry for the english, I'm not a native english speaker )