actr_cli/templates/rust/
empty.rs1use crate::error::Result;
2use crate::templates::ProjectTemplate;
3use std::collections::HashMap;
4use std::path::Path;
5
6pub fn load(files: &mut HashMap<String, String>) -> Result<()> {
7 let fixtures_root = Path::new(env!("CARGO_MANIFEST_DIR")).join("fixtures");
8
9 ProjectTemplate::load_file(
10 &fixtures_root.join("rust/Cargo.service.toml.hbs"),
11 files,
12 "Cargo.toml",
13 )?;
14 ProjectTemplate::load_file(
15 &fixtures_root.join("rust/build.rs.service.hbs"),
16 files,
17 "build.rs",
18 )?;
19 ProjectTemplate::load_file(
20 &fixtures_root.join("rust/empty/lib.rs.hbs"),
21 files,
22 "src/lib.rs",
23 )?;
24 ProjectTemplate::load_file(
25 &fixtures_root.join("rust/empty/manifest.toml.hbs"),
26 files,
27 "manifest.toml",
28 )?;
29 ProjectTemplate::load_file(
30 &fixtures_root.join("rust/empty/README.md.hbs"),
31 files,
32 "README.md",
33 )?;
34 ProjectTemplate::load_file(
35 &fixtures_root.join("rust/gitignore.hbs"),
36 files,
37 ".gitignore",
38 )?;
39
40 Ok(())
41}