In Ruby, we got away with returning a nil, but in Rust we are forced to declare a return type for our function and we need a type that would cover both a possible match ( i32 index) and the possibility that the operation failed.