MCPcopy Create free account
hub / github.com/Botloader/botloader / prepend_script_source_header

Function prepend_script_source_header

components/vm/src/lib.rs:23–29  ·  view source on GitHub ↗
(source: &str, script: Option<&Script>)

Source from the content-addressed store, hash-verified

21 include_bytes!(concat!(env!("OUT_DIR"), "/BOTLOADER_SNAPSHOT.bin"));
22
23pub fn prepend_script_source_header(source: &str, script: Option<&Script>) -> String {
24 let mut result = gen_script_source_header(script);
25 result.push_str(source);
26 result.push_str("\nscript.run();");
27
28 result
29}
30
31fn gen_script_source_header(script: Option<&Script>) -> String {
32 match script {

Callers 1

compile_add_scriptMethod · 0.85

Calls 1

gen_script_source_headerFunction · 0.85

Tested by

no test coverage detected