Skip to content

Commit

Permalink
Inline Windows OsStrExt::encode_wide
Browse files Browse the repository at this point in the history
User crates currently produce much more code than necessary because the
optimizer fails to make assumptions about this method.
  • Loading branch information
nvzqz committed Jun 7, 2022
1 parent 9c97062 commit 772da4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions std/src/os/windows/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 772da4d

Please # to comment.