0xMiden / 0xMiden/protocol

Introduce a macro for declaring slot names

未关闭
#3,457 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
132
派生
167
平均合并
1 天 23 小时
30 天内合并 PR
110

描述

I think we could consider having a simple macro taking in just a `name` and a `path` that expands to this declaration. There's precedent for this with e.g. `account_component_code`. While in this case it doesn't help as much, we have a lot of these `SLOT_NAME` constants and it hurts readability for modules containing many of these, see e.g. https://github.com/0xMiden/protocol/blob/7cf8a220bfb4dddcba2fb9da8429187e4df1b1f3/crates/miden-standards/src/account/policies/manager.rs

_Originally posted by @zeapoz in https://github.com/0xMiden/protocol/pull/3456#discussion_r3691468410_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。