Skip to content

Conversation

@loewenheim
Copy link
Contributor

This doesn't do anything without getsentry/rust-sourcemap#129, but is sound even without it.

@loewenheim loewenheim requested review from a team and Swatinem May 30, 2025 11:00
let idx = match self.min_source_positions.binary_search(&sp.into()) {
Ok(idx) => idx,
Err(0) => 0,
Err(0) => return None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Swatinem can you think of a reason it would make sense to return 0 here? Surely the Err(0) case means our input location is unmapped?

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

looks reasonable to me. Can you create a small testcase for this specifically?

@loewenheim
Copy link
Contributor Author

Can you create a small testcase for this specifically?

Will do, but it might take a bit until I get around to it.

@loewenheim loewenheim requested a review from Swatinem June 2, 2025 15:26
@loewenheim loewenheim merged commit 06ef500 into master Jun 3, 2025
15 checks passed
@loewenheim loewenheim deleted the sebastian/sourcemapcache-unmapped branch June 3, 2025 07:48
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