Skip to content

fix: fix span overflow panic#36

Open
targc wants to merge 1 commit intoYS-L:mainfrom
targc:fix/prevent-span-overflow-panic
Open

fix: fix span overflow panic#36
targc wants to merge 1 commit intoYS-L:mainfrom
targc:fix/prevent-span-overflow-panic

Conversation

@targc
Copy link
Copy Markdown

@targc targc commented Sep 22, 2023

No description provided.

} else if self.index < self.spans.len() {
span = Some(self.spans.get(self.index).cloned().unwrap());
self.index += 1;
match self.spans.get(self.index).cloned() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @5ylar for the patch! Maybe I'm missing something, could you clarify in which scenario would the unwrap panic if we've checked that self.index is within bound? A test case would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants