BlockstreamResearch / simfony

Rust-like high-level language that compiles down to Simplicity bytecode. Work in progress.
19 stars 6 forks source link

move `WitFileData` definition inside the function it is used #18

Closed apoelstra closed 5 months ago

apoelstra commented 5 months ago

The existing code here is very weirdly structured -- we define a public struct WitFileData at the root, then have an impl block on it which is inside a function (and in the middle of code). The struct in question is only used within the function.

This looks like old code from Sanket and it may be we want to remove it entirely. But for now, having the pub struct and impl blocks separated causes a new warning in nightly rustc. So pull the struct definition inside the function, remove the pub, and rearrange the code.