Skip to content

refactor(allocator)!: return &'alloc str rather than &'alloc mut str in Allocator::alloc_str method#10564

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-23-refactor_allocator_return_alloc_str_rather_than_alloc_mut_str_in_allocator_alloc_str_method
Apr 23, 2025
Merged

refactor(allocator)!: return &'alloc str rather than &'alloc mut str in Allocator::alloc_str method#10564
graphite-app[bot] merged 1 commit intomainfrom
04-23-refactor_allocator_return_alloc_str_rather_than_alloc_mut_str_in_allocator_alloc_str_method

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Apr 23, 2025

No reason we return a mut str in this method.

@Dunqing Dunqing changed the title refactor(allocator): return &'alloc str rather than &'alloc mut str in Allocator::alloc_str method refactor(allocator)!: return &'alloc str rather than &'alloc mut str in Allocator::alloc_str method Apr 23, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Apr 23, 2025
Copy link
Member Author

Dunqing commented Apr 23, 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.

@Dunqing Dunqing requested a review from overlookmotel April 23, 2025 10:16
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 23, 2025

CodSpeed Instrumentation Performance Report

Merging #10564 will not alter performance

Comparing 04-23-refactor_allocator_return_alloc_str_rather_than_alloc_mut_str_in_allocator_alloc_str_method (fb829d9) with main (84742d8)

Summary

✅ 36 untouched benchmarks

Copy link
Member

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

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.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Apr 23, 2025
Copy link
Member

overlookmotel commented Apr 23, 2025

Merge activity

…tr` in `Allocator::alloc_str` method (#10564)

No reason we return a `mut str` in this method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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