Skip to content

Commit f86433b

Browse files
committed
fix: use 0-based index
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent 0c57ad4 commit f86433b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/parse.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ where
165165
let s = unsafe { std::str::from_utf8_unchecked(&token[1..]) };
166166
index = s
167167
.parse::<usize>()
168-
.map_err(|_| ParseVectorError::BadParsing { position })?
169-
- 1;
168+
.map_err(|_| ParseVectorError::BadParsing { position })?;
170169
token.clear();
171170
} else {
172171
return Err(ParseVectorError::TooShortNumber { position });

0 commit comments

Comments
 (0)