loop rust snippets