src: harden code for rust-0.11

- vector strings cannot be referenced with indexes, one should
  use methods like ``.get(idx)``
- unused variables can be ignored with ``_``
- whitespaces removed

Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Merge pull request #1 from harshavardhana/master

src: harden code for rust-0.11