File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ fn run() -> anyhow::Result<()> {
399
399
block_ctx_dump_prefix : args. block_ctx_dir . clone ( ) . map ( std:: path:: PathBuf :: from) ,
400
400
} ;
401
401
402
- params. entry_point = args. entry_point . clone ( ) ;
402
+ params. entry_point . clone_from ( & args. entry_point ) ;
403
403
if let Some ( ref version) = args. profile {
404
404
params. glsl . version = version. 0 ;
405
405
}
Original file line number Diff line number Diff line change @@ -227,8 +227,12 @@ impl super::CommandEncoder {
227
227
fn set_pipeline_inner ( & mut self , inner : & super :: PipelineInner ) {
228
228
self . cmd_buffer . commands . push ( C :: SetProgram ( inner. program ) ) ;
229
229
230
- self . state . first_instance_location = inner. first_instance_location . clone ( ) ;
231
- self . state . push_constant_descs = inner. push_constant_descs . clone ( ) ;
230
+ self . state
231
+ . first_instance_location
232
+ . clone_from ( & inner. first_instance_location ) ;
233
+ self . state
234
+ . push_constant_descs
235
+ . clone_from ( & inner. push_constant_descs ) ;
232
236
233
237
// rebind textures, if needed
234
238
let mut dirty_textures = 0u32 ;
Original file line number Diff line number Diff line change @@ -573,7 +573,7 @@ impl super::Device {
573
573
. collect ( ) ;
574
574
raw_view_formats. push ( original_format) ;
575
575
576
- wgt_view_formats = config. view_formats . clone ( ) ;
576
+ wgt_view_formats. clone_from ( & config. view_formats ) ;
577
577
wgt_view_formats. push ( config. format ) ;
578
578
}
579
579
@@ -1015,7 +1015,7 @@ impl crate::Device for super::Device {
1015
1015
let mut wgt_view_formats = vec ! [ ] ;
1016
1016
if !desc. view_formats . is_empty ( ) {
1017
1017
raw_flags |= vk:: ImageCreateFlags :: MUTABLE_FORMAT ;
1018
- wgt_view_formats = desc. view_formats . clone ( ) ;
1018
+ wgt_view_formats. clone_from ( & desc. view_formats ) ;
1019
1019
wgt_view_formats. push ( desc. format ) ;
1020
1020
1021
1021
if self . shared . private_caps . image_format_list {
You can’t perform that action at this time.
0 commit comments