Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing public interfaces to ASG #31

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

jakelishman
Copy link
Member

No description provided.

@jlapeyre
Copy link
Collaborator

Looks good.

@jlapeyre jlapeyre merged commit 88211a6 into Qiskit:main Jan 16, 2024
2 checks passed
@jakelishman jakelishman deleted the add-missing-interfaces branch January 16, 2024 18:35
Comment on lines +313 to +315
pub fn identifier(&self) -> &SymbolIdResult {
&self.identifier
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, this return type isn't ideal from an interface, but it's consistent with the rest of the library for now so we can fix the rest later.

Ideally, all the Result objects would get resolved (or auto-unwrapped) and SymbolId would derive Copy (since it's just a usize), then the return type would be SymbolId (or something more strongly typed). If the Result is kept, then Result<&T, &E> is the more useful return type than &Result<T, E>, and you can go from the latter to the former with Result::as_ref, but that's also doable from downstream code, so not the end of the world.

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.

2 participants