message: Remove unnecessary cloning
diff: @@ -13,7 +13,7 @@ trait GateVector<Field: FftField> {
  /** A row indexing in a constraint system.
  Either a public input row, or a non-public input row that starts at index 0.
  */
  -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
  +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
  enum Row {
  PublicInput(usize),
  AfterPublicInput(usize),
  @@ -31,7 +31,7 @@ impl Row {
  /* TODO: rename module Position to Permutation/Wiring? */
  /** A position represents the position of a cell in the constraint system.
  A position is a row and a column. */
  -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
  +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
  struct Position<Row> {
  row: Row,
  col: usize,
  @@ -210,10 +210,10 @@ enum PlonkConstraint<Var, Field> {
  }
  /* TODO: This is a Unique_id in OCaml. */
  -#[derive(Clone, PartialEq, Eq, Hash)]
  +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
  struct InternalVar(usize);
  -#[derive(Clone, PartialEq, Eq, Hash)]
  +#[derive(Copy, Clone, PartialEq, Eq, Hash)]
  enum V {
  /** An external variable (generated by snarky, via [exists]). */
  External(usize),
  @@ -283,10 +283,10 @@ impl<Field: FftField, Gates: GateVector<Field>> SnarkyConstraintSystem<Field, Ga
  fn equivalence_classes_to_hashtbl(self: &mut Self) -> HashMap<Position<Row>, Position<Row>> {
  let mut equivalence_classes: HashMap<usize, HashSet<Position<Row>>> = HashMap::new();
  for (key, data) in self.equivalence_classes.iter() {
  - let u = self.union_finds.find(key.clone()).unwrap();
  + let u = self.union_finds.find(*key).unwrap();
  let entry = equivalence_classes.entry(u).or_insert(HashSet::new());
  for position in data.iter() {
  - entry.insert(position.clone());
  + entry.insert(*position);
  }
  }
  let mut res: HashMap<Position<Row>, Position<Row>> = HashMap::new();
  @@ -295,7 +295,7 @@ impl<Field: FftField, Gates: GateVector<Field>> SnarkyConstraintSystem<Field, Ga
  /* HashSet uses an unstable order, so sort to avoid dealing with that. */
  data.sort();
  for (i, j) in (0..data.len()).zip((1..data.len()).chain(0..=0)) {
  - res.insert(data[i].clone(), data[j].clone());
  + res.insert(data[i], data[j]);
  }
  }
  res
  