refactor(allocator): simplify return type of FixedSizeAllocatorPool::create_new_allocator#17080
Conversation
CodSpeed Performance ReportMerging #17080 will not alter performanceComparing Summary
Footnotes
|
There was a problem hiding this comment.
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
Okpattern - 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.
1f3baec to
5fb89fb
Compare
8633439 to
2df9b9c
Compare
Merge activity
|
2df9b9c to
b657bb6
Compare
5fb89fb to
73c9ebf
Compare

Follow-on after #17023. Pure refactor.
Returning
Option<Result>was over-complicated. Just returnOption.