Skip to content

refactor(graphs): make BaseGraph::id return &str and align usages#398

Open
prestoalvarez wants to merge 3 commits intoBitVM:mainfrom
prestoalvarez:patch-1
Open

refactor(graphs): make BaseGraph::id return &str and align usages#398
prestoalvarez wants to merge 3 commits intoBitVM:mainfrom
prestoalvarez:patch-1

Conversation

@prestoalvarez
Copy link
Copy Markdown

Summary

Switch BaseGraph::id to return &str instead of &String for a more idiomatic and flexible API. No runtime logic changes.

Changes

  • Update trait method in bridge/src/graphs/base.rs to fn id(&self) -> &str.
  • Align implementations in bridge/src/graphs/peg_in.rs and bridge/src/graphs/peg_out.rs.
  • Adjust call sites and type usages to work with &str where applicable.

Motivation

  • Prefer string slices over owned String in signatures.
  • Decouple API from a concrete container, improve ergonomics and composability.
  • Avoid unnecessary allocations/copies at call sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant