@@ -142,7 +142,6 @@ impl Error {
142
142
}
143
143
144
144
/// Returns the kind of this error.
145
- #[ inline]
146
145
pub fn kind ( & self ) -> ErrorKind < ' _ > {
147
146
let data = self . data ( ) ;
148
147
if self . is_str {
@@ -154,38 +153,31 @@ impl Error {
154
153
}
155
154
156
155
/// Returns the raw data of this error.
157
- #[ inline]
158
156
pub fn data ( & self ) -> & [ u8 ] {
159
157
unsafe { & * self . data }
160
158
}
161
159
162
160
/// Returns `true` if this error is a human-readable string.
163
- #[ inline]
164
161
pub fn is_str ( & self ) -> bool {
165
162
self . is_str
166
163
}
167
164
168
- #[ inline]
169
165
fn new_str ( data : & ' static str ) -> Self {
170
166
Self :: _new ( true , false , data. as_bytes ( ) )
171
167
}
172
168
173
- #[ inline]
174
169
fn new_string ( data : String ) -> Self {
175
170
Self :: _new ( true , true , Box :: into_raw ( data. into_boxed_str ( ) . into_boxed_bytes ( ) ) )
176
171
}
177
172
178
- #[ inline]
179
173
fn new_bytes ( data : & ' static [ u8 ] ) -> Self {
180
174
Self :: _new ( false , false , data)
181
175
}
182
176
183
- #[ inline]
184
177
fn new_vec ( data : Vec < u8 > ) -> Self {
185
178
Self :: _new ( false , true , Box :: into_raw ( data. into_boxed_slice ( ) ) )
186
179
}
187
180
188
- #[ inline]
189
181
fn _new ( is_str : bool , drop : bool , data : * const [ u8 ] ) -> Self {
190
182
debug_assert ! ( !data. is_null( ) ) ;
191
183
Self { is_str, drop, data }
@@ -249,7 +241,6 @@ impl From<Vec<u8>> for Error {
249
241
}
250
242
251
243
impl From < Bytes > for Error {
252
- #[ inline]
253
244
fn from ( value : Bytes ) -> Self {
254
245
Self :: new_vec ( value. into ( ) )
255
246
}
0 commit comments