MCPcopy Create free account
hub / github.com/faern/rustscript / to_code_format

Method to_code_format

src/scriptbuilder.rs:34–41  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

32 }
33
34 pub fn to_code_format(&self) -> String {
35 let mut code = String::new();
36 if self.macro_use {
37 code.push_str("#[macro_use] ");
38 }
39 code.push_str(&format!("extern crate {};", self.name));
40 code
41 }
42}
43
44pub fn build_script_crate<P: AsRef<Path>, Q: AsRef<Path>>(script_path: P,

Callers 1

format_codeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected