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 ``_``