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:
Nikolai Vazquez 2022-06-07 14:53:59 -04:00
parent 20ad820928
commit 246a80c32c

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()
}