Skip to content

Commit e6a7afc

Browse files
committed
refactor
1 parent 089957f commit e6a7afc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dfx/src/lib/builders/motoko.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ impl MotokoBuilder {
4747
pool: &CanisterPool,
4848
canister_info: &CanisterInfo,
4949
config: &BuildConfig,
50-
motoko_info: &MotokoCanisterInfo,
5150
id_map: &BTreeMap<String, String>, // TODO: I feel that this variable should not be here.
5251
rev_id_map: &BTreeMap<String, String>, // TODO: I feel that this variable should not be here.
5352
cache: &dyn Cache,
5453
) -> DfxResult<BuildOutput> {
55-
let output_wasm_path = motoko_info.get_output_wasm_path();
56-
54+
let motoko_info = canister_info.as_info::<MotokoCanisterInfo>()?;
5755
let input_path = motoko_info.get_main_path();
5856
let profile = config.profile;
57+
58+
let output_wasm_path = motoko_info.get_output_wasm_path();
59+
5960
let package_arguments =
6061
package_arguments::load(cache, motoko_info.get_packtool())?;
6162
let mut package_arguments_map = BTreeMap::<String, String>::new(); // TODO: Can we deal without cloning strings?
@@ -334,7 +335,6 @@ impl CanisterBuilder for MotokoBuilder {
334335
pool,
335336
canister_info,
336337
config,
337-
&motoko_info,
338338
&id_map,
339339
&rev_id_map,
340340
cache.as_ref(),

0 commit comments

Comments
 (0)