Skip to content

remove SessionVar blanket impl, replace with type impls#7695

Merged
a10y merged 2 commits intodevelopfrom
aduffy/session-var-imppl
Apr 28, 2026
Merged

remove SessionVar blanket impl, replace with type impls#7695
a10y merged 2 commits intodevelopfrom
aduffy/session-var-imppl

Conversation

@a10y
Copy link
Copy Markdown
Contributor

@a10y a10y commented Apr 28, 2026

The blanket impl is a bit of a footgun, replace with impls for each of the session extension types

See discussion in #7693 (comment)

Playground link that illustrates what the blanket impl is doing: https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=86edbba2a1f4d7e4fb46f281fb21a8c3

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y requested review from gatesn and joseph-isaacs April 28, 2026 13:42
@a10y a10y added the changelog/chore A trivial change label Apr 28, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 28, 2026

Merging this PR will improve performance by 11.85%

⚡ 1 improved benchmark
✅ 1129 untouched benchmarks
⏩ 33 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bitwise_not_vortex_buffer_mut[128] 275.3 ns 246.1 ns +11.85%

Comparing aduffy/session-var-imppl (9e5e0b0) with develop (269cbeb)

Open in CodSpeed

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@joseph-isaacs
Copy link
Copy Markdown
Contributor

Can you add a doc str explaining that you need to do this

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y enabled auto-merge (squash) April 28, 2026 13:59
@a10y a10y merged commit 2db4ab1 into develop Apr 28, 2026
59 checks passed
@a10y a10y deleted the aduffy/session-var-imppl branch April 28, 2026 14:05
@gatesn
Copy link
Copy Markdown
Contributor

gatesn commented Apr 28, 2026

Could we just rename the as_any/as_any_mut functions instead to not conflict?

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

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants