-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When defining a contract module in a separate file and using #[contract] in lib.rs like:
#[contract]
pub mod counterThe code will not compile, if the file name is different from the struct. A mismatch between module name and struct name triggers a proc-macro panic with the following error:
proc-macro panicked: called `Option::unwrap()` on a `None` valueTo Reproduce
- Take the README example code
- Move the module content of counter to a new file named
counter.rs. - Rename
counter.rstocontract.rs - Update
lib.rsto usepub mod contract.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels