Skip to content

refactor(allocator): simplify return type of FixedSizeAllocatorPool::create_new_allocator#17080

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_
Dec 18, 2025
Merged

refactor(allocator): simplify return type of FixedSizeAllocatorPool::create_new_allocator#17080
graphite-app[bot] merged 1 commit intomainfrom
om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 18, 2025

Follow-on after #17023. Pure refactor.

Returning Option<Result> was over-complicated. Just return Option.

Copy link
Member Author

overlookmotel commented Dec 18, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Dec 18, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 18, 2025 22:21
Copilot AI review requested due to automatic review settings December 18, 2025 22:21
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 18, 2025

CodSpeed Performance Report

Merging #17080 will not alter performance

Comparing om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_ (5fb89fb) with om/12-18-perf_allocator_reduce_time_mutex_lock_is_held_in_fixedsizeallocatorpool_get_ (8633439)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on om/12-18-perf_allocator_reduce_time_mutex_lock_is_held_in_fixedsizeallocatorpool_get_ (2df9b9c) during the generation of this report, so 7f4438c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the return type of FixedSizeAllocatorPool::create_new_allocator from Option<Result<FixedSizeAllocator, ()>> to Option<FixedSizeAllocator>, making the code more idiomatic and easier to read.

  • Simplified return type eliminates unnecessary nesting since the error type () carries no information
  • Updated caller to use cleaner pattern matching without nested Ok pattern
  • Error handling logic is preserved through the use of result.ok() conversion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel force-pushed the om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_ branch from 1f3baec to 5fb89fb Compare December 18, 2025 23:02
@overlookmotel overlookmotel force-pushed the om/12-18-perf_allocator_reduce_time_mutex_lock_is_held_in_fixedsizeallocatorpool_get_ branch from 8633439 to 2df9b9c Compare December 18, 2025 23:02
@overlookmotel overlookmotel self-assigned this Dec 18, 2025
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Dec 18, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 18, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 18, 2025

Merge activity

…:create_new_allocator` (#17080)

Follow-on after #17023. Pure refactor.

Returning `Option<Result>` was over-complicated. Just return `Option`.
@graphite-app graphite-app bot force-pushed the om/12-18-perf_allocator_reduce_time_mutex_lock_is_held_in_fixedsizeallocatorpool_get_ branch from 2df9b9c to b657bb6 Compare December 18, 2025 23:44
@graphite-app graphite-app bot force-pushed the om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_ branch from 5fb89fb to 73c9ebf Compare December 18, 2025 23:45
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 18, 2025
Base automatically changed from om/12-18-perf_allocator_reduce_time_mutex_lock_is_held_in_fixedsizeallocatorpool_get_ to main December 18, 2025 23:51
@graphite-app graphite-app bot merged commit 73c9ebf into main Dec 18, 2025
22 checks passed
@graphite-app graphite-app bot deleted the om/12-18-refactor_allocator_simplify_return_type_of_fixedsizeallocatorpool_create_new_allocator_ branch December 18, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants