Skip to content

Conversation

NobodyXu
Copy link
Collaborator

@NobodyXu NobodyXu commented Jul 21, 2023

to avoid heap allocation if possible.

to avoid heap allocation if possible.

Signed-off-by: Jiahao XU <[email protected]>
@NobodyXu
Copy link
Collaborator Author

Build::get_{target, host, opt_level, debug} also returns Cow<str>, so it does make sense to also change Build::get_out_dir to return Cow<'_, Path>

@NobodyXu

This comment was marked as outdated.

@NobodyXu NobodyXu closed this Jul 21, 2023
@NobodyXu NobodyXu deleted the optimize-get_out_dir branch July 21, 2023 03:51
@NobodyXu NobodyXu restored the optimize-get_out_dir branch July 21, 2023 03:55
@NobodyXu NobodyXu reopened this Jul 21, 2023
@NobodyXu

This comment was marked as outdated.

Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

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

Seems fine.

@thomcc thomcc merged commit f74fe61 into rust-lang:main Jul 21, 2023
@NobodyXu NobodyXu deleted the optimize-get_out_dir branch July 21, 2023 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants