14 results - 3 files
src/lib.rs:
25 Ok((c, table)) => {
26: let c = c.to_string().clone();
27
28: let name = table.name.clone();
29 raw_tables.insert(name, Rc::new(RefCell::new(table)));
src/types.rs:
46 while let Some((name, table)) = get_first_element(&raw_tables) {
47: let name = name.clone();
48: let table = table.clone();
49
56 .iter()
57: .map(|item| item.borrow().name.clone())
58 .collect::<Vec<_>>();
83
84: parsed.insert(parsed_table.name.clone(), parsed_table);
85 }
97
98: parsed_table.name = raw.name.clone();
99
104 .fields
105: .insert(raw_field.name.clone(), Field::parse(raw_field)?);
106 }
122 let field = Field {
123: name: field_name.clone(),
124 datatype: fk_field.datatype,
125 foreign_key_reference: Some((
126: fk_table_name.clone(),
127: Rc::new(fk_field.clone()),
128 )),
148 .primary_key
149: .push(primary_key_field.clone());
150 }
187 .iter()
188: .map(|item| item.foreign_key_reference.as_ref().unwrap().1.name.clone())
189 .collect::<Vec<_>>()
src/parser/types.rs:
24 RawDataType::ForeignKeyTable(table_name) => {
25: table_names.push(table_name.clone())
26 }
At the current commit c3b5053 the
./src-folder contains 14clone()method calls.Things to do:
.tsqltest files and measure the footprint and the execution time when processing the file (done in 3cb1690)clone()s or change the structs (maybe useArc<[T]>instead ofVec<T>orArc<str>instead ofString::clone(...))All
clone()'s currently in the project