Avoid allocations with Cow<'a, str>
commit7cdc850c66e9acb5c0ad58c428e2041187a979c1
authorShayne Fletcher <shaynefletcher@fb.com>
Wed, 17 Feb 2021 21:20:06 +0000 (17 13:20 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Feb 2021 21:22:19 +0000 (17 13:22 -0800)
tree04dc325342f4f201539597d225b1e76c3e11988c
parent505da0f6c6ac3cf106a474ee1e224b79fafbdb83
Avoid allocations with Cow<'a, str>

Summary: As noted in D26319450 (https://github.com/facebook/hhvm/commit/9582d43c5204d13a102dfe86f7aadd0e84d625e2), change a particular function's return type to a `Cow<'arena, str>` to avoid any unnecessary allocations.

Reviewed By: shiqicao

Differential Revision: D26486279

fbshipit-source-id: f1ba7ed579d7a02ed16e6aca86f051bf0f22d3c1
hphp/hack/src/hhbc/hhbc_by_ref/hhbc_id.rs