Skip to content

Commit 409caee

Browse files
feat: reverting useless changes
1 parent e68b5c4 commit 409caee

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
@@ -25,7 +25,6 @@ pub struct Settings {
2525
pub initializers: Option<Initializers>,
2626
pub features: Features,
2727
pub loco_version_text: String,
28-
pub template_dir: String,
2928
pub os: OS,
3029
}
3130

@@ -59,7 +58,7 @@ impl From<AssetsOption> for Option<Asset> {
5958
impl Settings {
6059
/// Creates a new [`Settings`] instance based on prompt selections.
6160
#[must_use]
62-
pub fn from_wizard(package_name: &str, template_dir: &str, prompt_selection: &wizard::Selections, os: OS) -> Self {
61+
pub fn from_wizard(package_name: &str, prompt_selection: &wizard::Selections, os: OS) -> Self {
6362
let features = if prompt_selection.db.enable() {
6463
Features::default()
6564
} else {
@@ -72,7 +71,6 @@ impl Settings {
7271

7372
Self {
7473
package_name: package_name.to_string(),
75-
template_dir: template_dir.to_string(),
7674
module_name: package_name.to_snake_case(),
7775
auth: prompt_selection.db.enable(),
7876
mailer: prompt_selection.db.enable(),
@@ -103,7 +101,6 @@ impl Default for Settings {
103101
mailer: Default::default(),
104102
initializers: Default::default(),
105103
features: Default::default(),
106-
template_dir: "base_template".to_string(),
107104
loco_version_text: get_loco_version_text(),
108105
os: Default::default(),
109106
}

0 commit comments

Comments
 (0)