0xMiden / 0xMiden/protocol

Introduce a macro for declaring slot names

Ouverte
#3,457 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
132
Forks
167
Merge moyen
1 j 23 h
PR mergées (30 j)
110

Description

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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.