Create a gist now

Instantly share code, notes, and snippets.

@lnds /enumerate.rs
Last active Jan 11, 2016

What would you like to do?
For con enumerate en Rust
for (i,c) in accion.chars().enumerate() {
if !c.is_digit(10) { return Error }
else if i >= tam { return Error }
else {
let digito = c.to_digit(10).unwrap();
if num.contains(&digito) { return Error }
num.push(digito)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment