Rust upgrade

This pull request brings the code up to date with Rust as of yesterday. I believe this pull request supersedes PR #163 and should be merged instead of it, for two reasons:
- It includes the string changes.
- I don't believe the other pull request is correct. I'm going to comment in the other PR to explain my reasoning.