Skip to content

Commit

Permalink
Auto merge of #97841 - nvzqz:inline-encode-wide, r=thomcc
Browse files Browse the repository at this point in the history
Inline Windows `OsStrExt::encode_wide`

User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
  • Loading branch information
bors committed Jul 11, 2022
2 parents 2682b88 + 246a80c commit 7d1f57a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/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 7d1f57a

Please sign in to comment.