Skip to content

Instantly share code, notes, and snippets.

@theArjun
Created March 8, 2025 15:42
Show Gist options
  • Select an option

  • Save theArjun/851fbae7f44947e93865952eda6d82d2 to your computer and use it in GitHub Desktop.

Select an option

Save theArjun/851fbae7f44947e93865952eda6d82d2 to your computer and use it in GitHub Desktop.
let chars = vec!['a', 'b', 'c'];
for (idx, char) in chars.into_iter().enumerate() {
println!("Index: {}, Char: {}", idx, char);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment