Skip to content

Commit 772da4d

Browse files
committed
Inline Windows OsStrExt::encode_wide
User crates currently produce much more code than necessary because the optimizer fails to make assumptions about this method.
1 parent 9c97062 commit 772da4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: std/src/os/windows/ffi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ pub trait OsStrExt: Sealed {
129129

130130
#[stable(feature = "rust1", since = "1.0.0")]
131131
impl OsStrExt for OsStr {
132+
#[inline]
132133
fn encode_wide(&self) -> EncodeWide<'_> {
133134
self.as_inner().inner.encode_wide()
134135
}

0 commit comments

Comments
 (0)