Skip to content

Commit

Permalink
fix duplicated template_adjuster
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed Nov 20, 2023
1 parent ac339b0 commit f157cf1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 227 deletions.
214 changes: 0 additions & 214 deletions framework/meta/src/cmd/standalone/template/template_adjuster.rs

This file was deleted.

13 changes: 0 additions & 13 deletions framework/meta/src/template/template_adjuster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use toml::value::Table;
const TEST_DIRECTORY: &str = "./tests";
const ROOT_CARGO_TOML: &str = "./Cargo.toml";
const META_CARGO_TOML: &str = "./meta/Cargo.toml";
const WASM_CARGO_TOML: &str = "./wasm/Cargo.toml";

pub struct TemplateAdjuster {
pub metadata: TemplateMetadata,
Expand All @@ -20,7 +19,6 @@ pub struct TemplateAdjuster {
impl TemplateAdjuster {
pub fn update_dependencies(&self) {
self.update_dependencies_root();
self.update_dependencies_wasm();
self.update_dependencies_meta();
}

Expand Down Expand Up @@ -48,17 +46,6 @@ impl TemplateAdjuster {
toml.save_to_file(&cargo_toml_path);
}

fn update_dependencies_wasm(&self) {
let cargo_toml_path = self.target.contract_dir().join(WASM_CARGO_TOML);
let mut toml = CargoTomlContents::load_from_file(&cargo_toml_path);

if !self.keep_paths {
remove_paths_from_deps(&mut toml, &[&self.metadata.name]);
}

toml.save_to_file(&cargo_toml_path);
}

pub fn rename_template_to(&self) {
self.rename_trait_to();
self.rename_in_cargo_toml_root();
Expand Down

0 comments on commit f157cf1

Please sign in to comment.