Skip to content

Commit

Permalink
Make ext_contract mod public (#150)
Browse files Browse the repository at this point in the history
When using `ext_contract` macro outside of `lib.rs`, it generates private `mod`, so it's not possible to reuse it in other modules within the same crate.

This change makes module public
  • Loading branch information
Evgeny Kuzyakov authored May 29, 2020
1 parent db148a4 commit b8277e0
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified examples/fungible-token/res/fungible_token.wasm
Binary file not shown.
Binary file modified examples/gas-fee-tester/res/gas_fee_tester.wasm
Binary file not shown.
Binary file not shown.
Binary file modified examples/mission-control/res/mission_control.wasm
Binary file not shown.
Binary file not shown.
Binary file modified examples/status-message/res/status_message.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions near-sdk-core/src/code_generator/item_trait_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl ItemTraitInfo {
}
let mod_name = &self.mod_name;
quote! {
mod #mod_name {
pub mod #mod_name {
use super::*;
use near_sdk::{Gas, Balance, AccountId, Promise};
use std::string::ToString;
Expand Down Expand Up @@ -51,7 +51,7 @@ mod tests {
let actual = info.wrapped_module();

let expected = quote! {
mod external_cross_contract {
pub mod external_cross_contract {
use super::*;
use near_sdk::{Gas, Balance, AccountId, Promise};
use std::string::ToString;
Expand Down

0 comments on commit b8277e0

Please sign in to comment.