@@ -274,9 +274,9 @@ impl<B: GfxBackend> Device<B> {
274274            desc_allocator :  Mutex :: new ( descriptors) , 
275275            queue_group, 
276276            #[ cfg( debug_assertions) ]  
277-             life_guard :  LifeGuard :: new ( "<device>" . to_string ( ) ) , 
277+             life_guard :  LifeGuard :: new ( "<device>" ) , 
278278            #[ cfg( not( debug_assertions) ) ]  
279-             life_guard :  LifeGuard :: new ( String :: new ( ) ) , 
279+             life_guard :  LifeGuard :: new ( "" ) , 
280280            active_submission_index :  0 , 
281281            trackers :  Mutex :: new ( TrackerSet :: new ( B :: VARIANT ) ) , 
282282            render_passes :  Mutex :: new ( FastHashMap :: default ( ) ) , 
@@ -492,7 +492,7 @@ impl<B: GfxBackend> Device<B> {
492492            full_range :  ( ) , 
493493            sync_mapped_writes :  None , 
494494            map_state :  resource:: BufferMapState :: Idle , 
495-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
495+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
496496        } ) 
497497    } 
498498
@@ -584,7 +584,7 @@ impl<B: GfxBackend> Device<B> {
584584                levels :  0 ..desc. mip_level_count  as  hal:: image:: Level , 
585585                layers :  0 ..kind. num_layers ( ) , 
586586            } , 
587-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
587+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
588588        } ) 
589589    } 
590590
@@ -827,7 +827,7 @@ impl<B: GfxBackend> Device<B> {
827827                value :  id:: Valid ( self_id) , 
828828                ref_count :  self . life_guard . add_ref ( ) , 
829829            } , 
830-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
830+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
831831            bind_group_layout_ids :  desc
832832                . bind_group_layouts 
833833                . iter ( ) 
@@ -1596,7 +1596,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
15961596            extent :  texture. kind . extent ( ) . at_level ( desc. base_mip_level  as  _ ) , 
15971597            samples :  texture. kind . num_samples ( ) , 
15981598            selector, 
1599-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
1599+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
16001600        } ; 
16011601        let  ref_count = view. life_guard . add_ref ( ) ; 
16021602
@@ -1756,7 +1756,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
17561756                value :  id:: Valid ( device_id) , 
17571757                ref_count :  device. life_guard . add_ref ( ) , 
17581758            } , 
1759-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
1759+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
17601760            comparison :  info. comparison . is_some ( ) , 
17611761        } ; 
17621762        let  ref_count = sampler. life_guard . add_ref ( ) ; 
@@ -2423,7 +2423,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
24232423                ref_count :  device. life_guard . add_ref ( ) , 
24242424            } , 
24252425            layout_id :  id:: Valid ( desc. layout ) , 
2426-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
2426+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
24272427            used, 
24282428            dynamic_binding_info, 
24292429        } ; 
@@ -3194,7 +3194,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
31943194            flags, 
31953195            index_format :  desc. vertex_state . index_format , 
31963196            vertex_strides, 
3197-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
3197+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
31983198        } ; 
31993199
32003200        let  id = hub
@@ -3418,7 +3418,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
34183418                value :  id:: Valid ( device_id) , 
34193419                ref_count :  device. life_guard . add_ref ( ) , 
34203420            } , 
3421-             life_guard :  LifeGuard :: new ( desc. label . to_string_or_default ( ) ) , 
3421+             life_guard :  LifeGuard :: new ( desc. label . borrow_or_default ( ) ) , 
34223422        } ; 
34233423        let  id = hub
34243424            . compute_pipelines 
@@ -3624,9 +3624,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
36243624
36253625        let  swap_chain = swap_chain:: SwapChain  { 
36263626            #[ cfg( debug_assertions) ]  
3627-             life_guard :  LifeGuard :: new ( "<SwapChain>" . to_string ( ) ) , 
3627+             life_guard :  LifeGuard :: new ( "<SwapChain>" ) , 
36283628            #[ cfg( not( debug_assertions) ) ]  
3629-             life_guard :  LifeGuard :: new ( String :: new ( ) ) , 
3629+             life_guard :  LifeGuard :: new ( "" ) , 
36303630            device_id :  Stored  { 
36313631                value :  id:: Valid ( device_id) , 
36323632                ref_count :  device. life_guard . add_ref ( ) , 
0 commit comments