Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove wasm renaming in template #1276

Merged
merged 9 commits into from
Dec 18, 2023
13 changes: 0 additions & 13 deletions framework/meta/src/cmd/standalone/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();
andrei-marinica marked this conversation as resolved.
Show resolved Hide resolved
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
Loading