| 362 | |
| 363 | impl<'a, 'other> Extend<Parameter<'other>> for Cmdline<'a> { |
| 364 | fn extend<T: IntoIterator<Item = Parameter<'other>>>(&mut self, iter: T) { |
| 365 | // Note this is O(N*M), but in practice this doesn't matter |
| 366 | // because kernel cmdlines are typically quite small (limited |
| 367 | // to at most 4k depending on arch). Using a hash-based |
| 368 | // structure to reduce this to O(N)+C would likely raise the C |
| 369 | // portion so much as to erase any benefit from removing the |
| 370 | // combinatorial complexity. Plus CPUs are good at |
| 371 | // caching/pipelining through contiguous memory. |
| 372 | for param in iter { |
| 373 | self.add(¶m); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | impl PartialEq for Cmdline<'_> { |