Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
fankaiLiu committed Nov 26, 2023
1 parent 29302dc commit 513431a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/test_write_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod tests {
for (template_type, db_type, db_conn_type) in combinations {
// Generate a unique project name for each combination
let project_name = format!("test_{:?}_{:?}_{:?}", template_type, db_type, db_conn_type);

println!("Testing combination: {:?}", project_name);
let path_str = format!("target/{}", project_name);
std::fs::remove_dir_all(&path_str).unwrap_or(());
let path = Path::new(&path_str);
Expand Down
8 changes: 4 additions & 4 deletions src/utils/create_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,15 +598,15 @@ fn create_basic_file(
std::fs::create_dir_all(&src_path)?;

let templates = [
(
"Cargo.toml",
include_str!("../template/src/cargo_template.hbs"),
),
//src
(
"src/main.rs",
include_str!("../template/src/main_template.hbs"),
),
(
"src/Cargo.toml",
include_str!("../template/src/cargo_template.hbs"),
),
(
"src/config.rs",
include_str!("../template/src/config_template.hbs"),
Expand Down

0 comments on commit 513431a

Please sign in to comment.