File tree 1 file changed +5
-8
lines changed 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -296,13 +296,7 @@ pub enum LoadError {
296
296
297
297
impl fmt:: Display for LoadError {
298
298
fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
299
- f. write_str ( self . description ( ) )
300
- }
301
- }
302
-
303
- impl Error for LoadError {
304
- fn description ( & self ) -> & str {
305
- match * self {
299
+ let msg = match * self {
306
300
LoadError :: OpenFileFailed => "open file failed" ,
307
301
LoadError :: ReadError => "read error" ,
308
302
LoadError :: UnrecognizedCharacter => "unrecognized character" ,
@@ -313,10 +307,13 @@ impl Error for LoadError {
313
307
LoadError :: MaterialParseError => "material parse error" ,
314
308
LoadError :: InvalidObjectName => "invalid object name" ,
315
309
LoadError :: GenericFailure => "generic failure" ,
316
- }
310
+ } ;
311
+
312
+ f. write_str ( msg)
317
313
}
318
314
}
319
315
316
+ impl Error for LoadError { }
320
317
321
318
/// `LoadResult` is a result containing all the models loaded from the file and any materials from
322
319
/// referenced material libraries, or an error that occured while loading
You can’t perform that action at this time.
0 commit comments