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

feat(compiler): add impl From<Name> for NodeStr #773

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

goto-bus-stop
Copy link
Member

@goto-bus-stop goto-bus-stop commented Dec 6, 2023

Federation converts back and forth between Value::String(name) and Name representations in some of its directives. Going from a Value::String() to a Name is easy, you just do Name::new(). Going the other direction requires a copy or a turbofish dance with <Name as AsRef<NodeStr>>::as_ref(). With this patch you can do Value::String(name.into()).

@goto-bus-stop goto-bus-stop enabled auto-merge (squash) December 6, 2023 11:01
@goto-bus-stop goto-bus-stop merged commit d048d53 into main Dec 6, 2023
10 of 11 checks passed
@goto-bus-stop goto-bus-stop deleted the name-to-node-str branch December 6, 2023 11:04
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