diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CompositeComponentBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CompositeComponentBenchmark-report-github.md index 49eaf5fd8a4..66c1cb473ea 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CompositeComponentBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CompositeComponentBenchmark-report-github.md @@ -11,4 +11,4 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Allocated | |------------------------------- |---------:|---------:|---------:|----------:| -| CompositeComponent_ExecuteCore | 41.37 ns | 1.722 ns | 2.413 ns | - | +| CompositeComponent_ExecuteCore | 37.44 ns | 0.713 ns | 0.952 ns | - | diff --git a/src/Polly.Core/Utils/Pipeline/DelegatingComponent.cs b/src/Polly.Core/Utils/Pipeline/DelegatingComponent.cs index 403ee12ea9d..1324cc8f45e 100644 --- a/src/Polly.Core/Utils/Pipeline/DelegatingComponent.cs +++ b/src/Polly.Core/Utils/Pipeline/DelegatingComponent.cs @@ -77,18 +77,6 @@ internal ValueTask> ExecuteComponentAot( new StateWrapper(Next!, callback, state!)); } - private struct StateWrapper - { - public StateWrapper(PipelineComponent next, object callback, object state) - { - Next = next; - Callback = callback; - State = state; - } - - public PipelineComponent Next; - public object Callback; - public object State; - } + private readonly record struct StateWrapper(PipelineComponent Next, object Callback, object State); #endif }