[rust-dev] NewType change in 0.9
adamson.benjamin at gmail.com
Sat Jan 11 14:03:53 PST 2014
Hello Rust community!
I've been busying myself over the past few weeks learning the different
features of rust, and I have been working on an implementation of Conway's
game of life (while trying to explore different features of rust.
In 0.9, it was changed so that you cannot dereference haskell-like
"NewTypes" with the * operator. In the 0.9 documentation, it says we can
use pattern matching to extract the underlying type.
Right here in my 0.8 code I dererenced the row parameter here:
which is a simple 'NewType', with underlying type uint.
My question is, instead of dereferencing the 'Row' and 'Column' types, how
can I use pattern matching here, to get the underlying uint to index the
array with the code I just linked?
Thanks in advance! :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev