chore: satisfy clippy::assigning_clones

This commit is contained in:
Erich Gubler 2024-05-02 16:08:54 -04:00
parent bfe96d87b2
commit f1b06f55ce
3 changed files with 9 additions and 5 deletions

View File

@ -399,7 +399,7 @@ fn run() -> anyhow::Result<()> {
block_ctx_dump_prefix: args.block_ctx_dir.clone().map(std::path::PathBuf::from),
};
params.entry_point = args.entry_point.clone();
params.entry_point.clone_from(&args.entry_point);
if let Some(ref version) = args.profile {
params.glsl.version = version.0;
}

View File

@ -227,8 +227,12 @@ impl super::CommandEncoder {
fn set_pipeline_inner(&mut self, inner: &super::PipelineInner) {
self.cmd_buffer.commands.push(C::SetProgram(inner.program));
self.state.first_instance_location = inner.first_instance_location.clone();
self.state.push_constant_descs = inner.push_constant_descs.clone();
self.state
.first_instance_location
.clone_from(&inner.first_instance_location);
self.state
.push_constant_descs
.clone_from(&inner.push_constant_descs);
// rebind textures, if needed
let mut dirty_textures = 0u32;

View File

@ -573,7 +573,7 @@ impl super::Device {
.collect();
raw_view_formats.push(original_format);
wgt_view_formats = config.view_formats.clone();
wgt_view_formats.clone_from(&config.view_formats);
wgt_view_formats.push(config.format);
}
@ -1015,7 +1015,7 @@ impl crate::Device for super::Device {
let mut wgt_view_formats = vec![];
if !desc.view_formats.is_empty() {
raw_flags |= vk::ImageCreateFlags::MUTABLE_FORMAT;
wgt_view_formats = desc.view_formats.clone();
wgt_view_formats.clone_from(&desc.view_formats);
wgt_view_formats.push(desc.format);
if self.shared.private_caps.image_format_list {