@@ -16,15 +16,15 @@ use thiserror::Error;
1616/// Errors that occur while loading assets with an AssetServer
1717#[ derive( Error , Debug ) ]
1818pub enum AssetServerError {
19- #[ error( "Asset folder path is not a directory. " ) ]
19+ #[ error( "asset folder path is not a directory" ) ]
2020 AssetFolderNotADirectory ( String ) ,
21- #[ error( "No AssetLoader found for the given extension. " ) ]
21+ #[ error( "no AssetLoader found for the given extension" ) ]
2222 MissingAssetLoader ( Option < String > ) ,
23- #[ error( "The given type does not match the type of the loaded asset. " ) ]
23+ #[ error( "the given type does not match the type of the loaded asset" ) ]
2424 IncorrectHandleType ,
25- #[ error( "Encountered an error while loading an asset. " ) ]
25+ #[ error( "encountered an error while loading an asset" ) ]
2626 AssetLoaderError ( anyhow:: Error ) ,
27- #[ error( "PathLoader encountered an error" ) ]
27+ #[ error( "` PathLoader` encountered an error" ) ]
2828 PathLoaderError ( #[ from] AssetIoError ) ,
2929}
3030
@@ -238,7 +238,7 @@ impl AssetServer {
238238 let mut asset_sources = self . server . asset_sources . write ( ) ;
239239 let source_info = asset_sources
240240 . get_mut ( & asset_path_id. source_path_id ( ) )
241- . expect ( "AssetSource should exist at this point" ) ;
241+ . expect ( "` AssetSource` should exist at this point. " ) ;
242242 if version != source_info. version {
243243 return Ok ( asset_path_id) ;
244244 }
@@ -317,7 +317,7 @@ impl AssetServer {
317317 continue ;
318318 }
319319 let handle =
320- self . load_untyped ( child_path. to_str ( ) . expect ( "Path should be a valid string" ) ) ;
320+ self . load_untyped ( child_path. to_str ( ) . expect ( "Path should be a valid string. " ) ) ;
321321 handles. push ( handle) ;
322322 }
323323 }
@@ -334,7 +334,7 @@ impl AssetServer {
334334 let ref_change = match receiver. try_recv ( ) {
335335 Ok ( ref_change) => ref_change,
336336 Err ( TryRecvError :: Empty ) => break ,
337- Err ( TryRecvError :: Disconnected ) => panic ! ( "RefChange channel disconnected" ) ,
337+ Err ( TryRecvError :: Disconnected ) => panic ! ( "RefChange channel disconnected. " ) ,
338338 } ;
339339 match ref_change {
340340 RefChange :: Increment ( handle_id) => * ref_counts. entry ( handle_id) . or_insert ( 0 ) += 1 ,
@@ -377,7 +377,7 @@ impl AssetServer {
377377 let asset_value = asset
378378 . value
379379 . take ( )
380- . expect ( "Asset should exist at this point" ) ;
380+ . expect ( "Asset should exist at this point. " ) ;
381381 if let Some ( asset_lifecycle) = asset_lifecycles. get ( & asset_value. type_uuid ( ) ) {
382382 let asset_path =
383383 AssetPath :: new_ref ( & load_context. path , label. as_ref ( ) . map ( |l| l. as_str ( ) ) ) ;
@@ -431,7 +431,7 @@ impl AssetServer {
431431 Err ( TryRecvError :: Empty ) => {
432432 break ;
433433 }
434- Err ( TryRecvError :: Disconnected ) => panic ! ( "AssetChannel disconnected" ) ,
434+ Err ( TryRecvError :: Disconnected ) => panic ! ( "AssetChannel disconnected. " ) ,
435435 }
436436 }
437437 }
0 commit comments