Skip to content

Commit f1b06f5

Browse files
chore: satisfy clippy::assigning_clones
1 parent bfe96d8 commit f1b06f5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

naga-cli/src/bin/naga.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ fn run() -> anyhow::Result<()> {
399399
block_ctx_dump_prefix: args.block_ctx_dir.clone().map(std::path::PathBuf::from),
400400
};
401401

402-
params.entry_point = args.entry_point.clone();
402+
params.entry_point.clone_from(&args.entry_point);
403403
if let Some(ref version) = args.profile {
404404
params.glsl.version = version.0;
405405
}

wgpu-hal/src/gles/command.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,12 @@ impl super::CommandEncoder {
227227
fn set_pipeline_inner(&mut self, inner: &super::PipelineInner) {
228228
self.cmd_buffer.commands.push(C::SetProgram(inner.program));
229229

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);
232236

233237
// rebind textures, if needed
234238
let mut dirty_textures = 0u32;

wgpu-hal/src/vulkan/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ impl super::Device {
573573
.collect();
574574
raw_view_formats.push(original_format);
575575

576-
wgt_view_formats = config.view_formats.clone();
576+
wgt_view_formats.clone_from(&config.view_formats);
577577
wgt_view_formats.push(config.format);
578578
}
579579

@@ -1015,7 +1015,7 @@ impl crate::Device for super::Device {
10151015
let mut wgt_view_formats = vec![];
10161016
if !desc.view_formats.is_empty() {
10171017
raw_flags |= vk::ImageCreateFlags::MUTABLE_FORMAT;
1018-
wgt_view_formats = desc.view_formats.clone();
1018+
wgt_view_formats.clone_from(&desc.view_formats);
10191019
wgt_view_formats.push(desc.format);
10201020

10211021
if self.shared.private_caps.image_format_list {

0 commit comments

Comments
 (0)