Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use replace instead of insert to add extension
Previously `ExtensionsMut::insert` was used without a guarantee that we had exclusive access to a SpanRef's extensions. This could lead to a panic in the `insert` function in the case where the extension was inserted concurrently by multiple calls to `eval_ctx`. By using `replace` the assertion is ignored and it no longer matters whether we have exclusive access or not to a span in `eval_ctx`.
- Loading branch information