Auto merge of #97841 - nvzqz:inline-encode-wide, r=thomcc

Inline Windows `OsStrExt::encode_wide`

User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
This commit is contained in:
bors 2022-07-11 09:30:54 +00:00
commit 7d1f57a757

View file

@ -129,6 +129,7 @@ pub trait OsStrExt: Sealed {
#[stable(feature = "rust1", since = "1.0.0")]
impl OsStrExt for OsStr {
#[inline]
fn encode_wide(&self) -> EncodeWide<'_> {
self.as_inner().inner.encode_wide()
}