We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9dc5c2 commit ed5ec7fCopy full SHA for ed5ec7f
src/main.rs
@@ -529,18 +529,9 @@ impl Executor {
529
530
let text = self.pop_stack().get_string();
531
532
- let value;
533
- match patern.captures(text.as_str()) {
534
- Some(i) => value = i,
535
- None => {
536
- self.stack.push(Type::List(vec![]));
537
- return;
538
- }
539
540
-
541
let mut list: Vec<Type> = Vec::new();
542
- for i in 0..value.len() - 1 {
543
- list.push(Type::String(value.at(i).unwrap_or("").to_string()))
+ for i in patern.captures_iter(text.as_str()) {
+ list.push(Type::String(i[0].to_string()))
544
}
545
self.stack.push(Type::List(list));
546
0 commit comments