@@ -104,79 +104,91 @@ pub trait IntoRawFd {
104
104
105
105
#[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
106
106
impl AsRawFd for RawFd {
107
+ #[ inline]
107
108
fn as_raw_fd ( & self ) -> RawFd {
108
109
* self
109
110
}
110
111
}
111
112
#[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
112
113
impl IntoRawFd for RawFd {
114
+ #[ inline]
113
115
fn into_raw_fd ( self ) -> RawFd {
114
116
self
115
117
}
116
118
}
117
119
#[ stable( feature = "raw_fd_reflexive_traits" , since = "1.48.0" ) ]
118
120
impl FromRawFd for RawFd {
121
+ #[ inline]
119
122
unsafe fn from_raw_fd ( fd : RawFd ) -> RawFd {
120
123
fd
121
124
}
122
125
}
123
126
124
127
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
125
128
impl AsRawFd for fs:: File {
129
+ #[ inline]
126
130
fn as_raw_fd ( & self ) -> RawFd {
127
131
self . as_inner ( ) . fd ( ) . raw ( )
128
132
}
129
133
}
130
134
#[ stable( feature = "from_raw_os" , since = "1.1.0" ) ]
131
135
impl FromRawFd for fs:: File {
136
+ #[ inline]
132
137
unsafe fn from_raw_fd ( fd : RawFd ) -> fs:: File {
133
138
fs:: File :: from_inner ( sys:: fs:: File :: from_inner ( fd) )
134
139
}
135
140
}
136
141
#[ stable( feature = "into_raw_os" , since = "1.4.0" ) ]
137
142
impl IntoRawFd for fs:: File {
143
+ #[ inline]
138
144
fn into_raw_fd ( self ) -> RawFd {
139
145
self . into_inner ( ) . into_fd ( ) . into_raw ( )
140
146
}
141
147
}
142
148
143
149
#[ stable( feature = "asraw_stdio" , since = "1.21.0" ) ]
144
150
impl AsRawFd for io:: Stdin {
151
+ #[ inline]
145
152
fn as_raw_fd ( & self ) -> RawFd {
146
153
libc:: STDIN_FILENO
147
154
}
148
155
}
149
156
150
157
#[ stable( feature = "asraw_stdio" , since = "1.21.0" ) ]
151
158
impl AsRawFd for io:: Stdout {
159
+ #[ inline]
152
160
fn as_raw_fd ( & self ) -> RawFd {
153
161
libc:: STDOUT_FILENO
154
162
}
155
163
}
156
164
157
165
#[ stable( feature = "asraw_stdio" , since = "1.21.0" ) ]
158
166
impl AsRawFd for io:: Stderr {
167
+ #[ inline]
159
168
fn as_raw_fd ( & self ) -> RawFd {
160
169
libc:: STDERR_FILENO
161
170
}
162
171
}
163
172
164
173
#[ stable( feature = "asraw_stdio_locks" , since = "1.35.0" ) ]
165
174
impl < ' a > AsRawFd for io:: StdinLock < ' a > {
175
+ #[ inline]
166
176
fn as_raw_fd ( & self ) -> RawFd {
167
177
libc:: STDIN_FILENO
168
178
}
169
179
}
170
180
171
181
#[ stable( feature = "asraw_stdio_locks" , since = "1.35.0" ) ]
172
182
impl < ' a > AsRawFd for io:: StdoutLock < ' a > {
183
+ #[ inline]
173
184
fn as_raw_fd ( & self ) -> RawFd {
174
185
libc:: STDOUT_FILENO
175
186
}
176
187
}
177
188
178
189
#[ stable( feature = "asraw_stdio_locks" , since = "1.35.0" ) ]
179
190
impl < ' a > AsRawFd for io:: StderrLock < ' a > {
191
+ #[ inline]
180
192
fn as_raw_fd ( & self ) -> RawFd {
181
193
libc:: STDERR_FILENO
182
194
}
0 commit comments