@@ -230,7 +230,7 @@ impl AssetServer {
230
230
231
231
let mut extensions = vec ! [ full_extension. clone( ) ] ;
232
232
extensions. extend (
233
- AssetPath :: iter_secondary_extensions ( & full_extension) . map ( |e| e . to_string ( ) ) ,
233
+ AssetPath :: iter_secondary_extensions ( & full_extension) . map ( ToString :: to_string) ,
234
234
) ;
235
235
236
236
MissingAssetLoaderForExtensionError { extensions }
@@ -493,7 +493,7 @@ impl AssetServer {
493
493
force : bool ,
494
494
meta_transform : Option < MetaTransform > ,
495
495
) -> Result < UntypedHandle , AssetLoadError > {
496
- let asset_type_id = input_handle. as_ref ( ) . map ( |handle| handle . type_id ( ) ) ;
496
+ let asset_type_id = input_handle. as_ref ( ) . map ( UntypedHandle :: type_id) ;
497
497
498
498
let path = path. into_owned ( ) ;
499
499
let path_clone = path. clone ( ) ;
@@ -938,7 +938,7 @@ impl AssetServer {
938
938
/// or is still "alive".
939
939
pub fn get_handle < ' a , A : Asset > ( & self , path : impl Into < AssetPath < ' a > > ) -> Option < Handle < A > > {
940
940
self . get_path_and_type_id_handle ( & path. into ( ) , TypeId :: of :: < A > ( ) )
941
- . map ( |h| h . typed_debug_checked ( ) )
941
+ . map ( UntypedHandle :: typed_debug_checked)
942
942
}
943
943
944
944
/// Get a `Handle` from an `AssetId`.
@@ -949,7 +949,8 @@ impl AssetServer {
949
949
/// Consider using [`Assets::get_strong_handle`] in the case the `Handle`
950
950
/// comes from [`Assets::add`].
951
951
pub fn get_id_handle < A : Asset > ( & self , id : AssetId < A > ) -> Option < Handle < A > > {
952
- self . get_id_handle_untyped ( id. untyped ( ) ) . map ( |h| h. typed ( ) )
952
+ self . get_id_handle_untyped ( id. untyped ( ) )
953
+ . map ( UntypedHandle :: typed)
953
954
}
954
955
955
956
/// Get an `UntypedHandle` from an `UntypedAssetId`.
0 commit comments