Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Jan 21, 2025
1 parent b0aa09f commit f1c7d44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn main() -> Result<()> {
printer::print_logo();
let opts: Opts = Opts::parse();
match opts.subcmd {
SubCommand::New(NewCmd {project_name, lang}) => {
SubCommand::New(NewCmd { project_name, lang }) => {
set_locale(&lang);
let proj = Project {
name: project_name,
Expand Down
8 changes: 4 additions & 4 deletions src/templates/classic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub fn generate(proj: &Project) -> Result<()> {
Ok(())
}

pub(crate) fn create_files(project_path: &Path, user_selected: Selected, proj: &Project) -> Result<()> {
let db_lib = user_selected.db_lib.to_string();
let db_type = user_selected.db_type.to_string();
pub(crate) fn create_files(project_path: &Path, selected: Selected, proj: &Project) -> Result<()> {
let db_lib = selected.db_lib.to_string();
let db_type = selected.db_type.to_string();
let data = liquid::object!({
"project_name": proj.name,
"db_type":db_type,
Expand Down Expand Up @@ -113,7 +113,7 @@ pub(crate) fn create_files(project_path: &Path, user_selected: Selected, proj: &
"diesel_cli_website": t!("diesel_cli_website").replace(r"\n", "\n"),
});

let db_lib_str = &*user_selected.db_lib.to_string();
let db_lib_str = &*selected.db_lib.to_string();
for filename in Template::iter() {
if filename.starts_with("_base/") {
let file = Template::get(filename.as_ref()).expect("file must exist");
Expand Down

0 comments on commit f1c7d44

Please sign in to comment.