MCPcopy Create free account
hub / github.com/bootc-dev/bootc / extend

Method extend

crates/kernel_cmdline/src/utf8.rs:260–264  ·  view source on GitHub ↗

Note this is O(N*M), but in practice this doesn't matter because kernel cmdlines are typically quite small (limited to at most 4k depending on arch). Using a hash-based structure to reduce this to O(N)+C would likely raise the C portion so much as to erase any benefit from removing the combinatorial complexity. Plus CPUs are good at caching/pipelining through contiguous memory.

(&mut self, iter: T)

Source from the content-addressed store, hash-verified

258 // combinatorial complexity. Plus CPUs are good at
259 // caching/pipelining through contiguous memory.
260 fn extend<T: IntoIterator<Item = Parameter<'other>>>(&mut self, iter: T) {
261 for param in iter {
262 self.add(&param);
263 }
264 }
265}
266
267/// A single kernel command line parameter key

Callers 15

read_tmpfilesFunction · 0.45
build_ukifyFunction · 0.45
path_relative_toFunction · 0.45
install_via_bootupdFunction · 0.45
install_systemd_bootFunction · 0.45
load_usernamesFunction · 0.45
load_groupnamesFunction · 0.45
runFunction · 0.45
get_kargs_in_rootFunction · 0.45
get_kargs_from_ostreeFunction · 0.45
get_kargsFunction · 0.45
lint_innerFunction · 0.45

Calls 1

addMethod · 0.45

Tested by 2

test_extendFunction · 0.36
test_extend_emptyFunction · 0.36