Commit 620ec61
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`.1 parent 53aeced commit 620ec61
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments