20 ms·
> In the Rust example I can access static ref BUF from fn main() function, for example. Only because in that simple example, BUF was defined directly in the ma
by littlestymaar 5y ago
> In the Rust example I can access static ref BUF from fn main() function, for example.
Only because in that simple example, BUF was defined directly in the main module.
In a more realistic exemple, BUF and tmpstr would belong to their own module, with only tmpstr being exported (and then accessible). See: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5ab2b41b09a19806de5fdb0922a279ca https://play.rust-lang.org/?version=stable&mode=debug&editio...