iden3 / circom

zkSnark circuit compiler
GNU General Public License v3.0
1.31k stars 253 forks source link

Remove unnecessary clones #228

Closed mina86 closed 8 months ago

mina86 commented 9 months ago

This addresses the following build warnings:

warning: call to `.clone()` on a reference in this situation does nothing
   --> compiler/src/circuit_design/circuit.rs:579:40
579 |     let c_folder_path = Path::new(c_folder.clone()).to_path_buf();
    |                                           ^^^^^^^^ help: remove this redundant call

warning: call to `.clone()` on a reference in this situation does nothing
   --> compiler/src/circuit_design/circuit.rs:593:42
593 |     let js_folder_path = Path::new(js_folder.clone()).to_path_buf();
    |                                             ^^^^^^^^ help: remove this redundant call

warning: call to `.clone()` on a reference in this situation does nothing
   --> parser/src/include_logic.rs:153:21
153 |                 file.clone().to_string()
    |                     ^^^^^^^^ help: remove this redundant call