-
Error: When the index 1; has None or no match, it is panic'ing. How can I handle this?
Appreciate if I can get a direction on this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sorry - I think I got it done myself. This helped me to put a default value of "" if the capture did not have a value. Thanks ! |
Beta Was this translation helpful? Give feedback.
Sorry - I think I got it done myself.
Instead of using .index
I used the .get(1).map_or("", |m|m.as_str())
This helped me to put a default value of "" if the capture did not have a value.
Thanks !