refactor(allocator)!: return &'alloc str rather than &'alloc mut str in Allocator::alloc_str method#10564
Conversation
&'alloc str rather than &'alloc mut str in Allocator::alloc_str method&'alloc str rather than &'alloc mut str in Allocator::alloc_str method
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
CodSpeed Instrumentation Performance ReportMerging #10564 will not alter performanceComparing Summary
|
overlookmotel
left a comment
There was a problem hiding this comment.
I left it the same as Bumpalo's alloc_str method on the grounds that we might want a &mut str for something. But you're right - we have no obvious use cases for that.
Merge activity
|
…tr` in `Allocator::alloc_str` method (#10564) No reason we return a `mut str` in this method.
d7962e9 to
fb829d9
Compare
self.reserve(1) calls with self.grow_one() for better efficiency
#9856

No reason we return a
mut strin this method.