Inserts potentially many join keys into the set, copying only when necessary returns true if any of the pairs were inserted
(
&mut self,
iter: impl IntoIterator<Item = &'a (Expr, Expr)>,
)
| 81 | /// |
| 82 | /// returns true if any of the pairs were inserted |
| 83 | pub fn insert_all<'a>( |
| 84 | &mut self, |
| 85 | iter: impl IntoIterator<Item = &'a (Expr, Expr)>, |
| 86 | ) -> bool { |
| 87 | let mut inserted = false; |
| 88 | for (left, right) in iter.into_iter() { |
| 89 | inserted |= self.insert(left, right); |
| 90 | } |
| 91 | inserted |
| 92 | } |
| 93 | |
| 94 | /// Same as [`Self::insert_all`] but avoids cloning expressions if they are |
| 95 | /// already owned |