From 2ba1f267d28c0ed52dad0c3796eac4c172e16850 Mon Sep 17 00:00:00 2001 From: Tony Jinwoo Ahn Date: Sun, 3 Oct 2021 13:17:53 +0900 Subject: [PATCH] Modify range in sre.rs For readability, replace exclusive range with inclusive range. --- vm/src/stdlib/sre.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/stdlib/sre.rs b/vm/src/stdlib/sre.rs index 5c223bda34..64bc77baf6 100644 --- a/vm/src/stdlib/sre.rs +++ b/vm/src/stdlib/sre.rs @@ -349,7 +349,7 @@ mod _sre { let m = Match::new(&state, zelf.clone(), split_args.string.clone()); // add groups (if any) - for i in 1..zelf.groups + 1 { + for i in 1..=zelf.groups { splitlist.push( m.get_slice(i, state.string, vm) .unwrap_or_else(|| vm.ctx.none()),