MaterialManager: Avoid some clone
This commit is contained in:
parent
1a071e44a9
commit
b7bc6478e2
1 changed files with 3 additions and 4 deletions
|
@ -119,7 +119,6 @@ impl MaterialManager {
|
|||
};
|
||||
|
||||
let type_id = TypeId::of::<M>();
|
||||
let material = Arc::new(RwLock::new(M::default()));
|
||||
|
||||
let mut materials_id = self.materials_id.write().unwrap();
|
||||
let mut materials_pipeline_id = self.materials_pipeline_id.write().unwrap();
|
||||
|
@ -130,10 +129,10 @@ impl MaterialManager {
|
|||
|
||||
materials_id.push(type_id);
|
||||
materials_pipeline_id.push(pipeline_id);
|
||||
materials_pipeline.push(pipeline.clone());
|
||||
materials_pipeline_state.push(pipeline_state.clone());
|
||||
materials_pipeline.push(pipeline);
|
||||
materials_pipeline_state.push(pipeline_state);
|
||||
materials_state.push(Arc::new(RwLock::new(MaterialState::Loading)));
|
||||
materials.push(material.clone());
|
||||
materials.push(Arc::new(RwLock::new(M::default())));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue