(&self)
| 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 | |
| 44 | pub fn build_script_crate<P: AsRef<Path>, Q: AsRef<Path>>(script_path: P, |