Skip to content

Commit 17e02e3

Browse files
feat: reverting useless changes
1 parent 573ffde commit 17e02e3

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

loco-new/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loco-new/src/generator/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ use crate::{settings, OS};
2323

2424
static APP_TEMPLATE: Dir<'_> = include_dir!("base_template");
2525

26-
2726
/// Extracts a default template to a temporary directory for use by the
2827
/// application.
2928
///
3029
/// # Errors
3130
/// when could not extract the the base template
3231
pub fn extract_default_template() -> std::io::Result<tree_fs::Tree> {
3332
let generator_tmp_folder = tree_fs::TreeBuilder::default().create()?;
33+
3434
APP_TEMPLATE.extract(&generator_tmp_folder.root)?;
3535
Ok(generator_tmp_folder)
3636
}

loco-new/src/settings.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub struct Settings {
2424
pub initializers: Option<Initializers>,
2525
pub features: Features,
2626
pub loco_version_text: String,
27-
pub template_dir: String,
2827
pub os: OS,
2928
}
3029

@@ -61,7 +60,7 @@ impl From<AssetsOption> for Option<Asset> {
6160
impl Settings {
6261
/// Creates a new [`Settings`] instance based on prompt selections.
6362
#[must_use]
64-
pub fn from_wizard(package_name: &str, template_dir: &str, prompt_selection: &wizard::Selections, os: OS) -> Self {
63+
pub fn from_wizard(package_name: &str, prompt_selection: &wizard::Selections, os: OS) -> Self {
6564
let features = if prompt_selection.db.enable() {
6665
Features::default()
6766
} else {
@@ -74,7 +73,6 @@ impl Settings {
7473

7574
Self {
7675
package_name: package_name.to_string(),
77-
template_dir: template_dir.to_string(),
7876
module_name: package_name.to_snake_case(),
7977
auth: prompt_selection.db.enable() && prompt_selection.background.enable(),
8078
mailer: prompt_selection.db.enable() && prompt_selection.background.enable(),
@@ -105,7 +103,6 @@ impl Default for Settings {
105103
mailer: Default::default(),
106104
initializers: Default::default(),
107105
features: Default::default(),
108-
template_dir: "base_template".to_string(),
109106
loco_version_text: get_loco_version_text(),
110107
os: Default::default(),
111108
}

0 commit comments

Comments
 (0)