-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refine API for interned labels #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those are great ergonomics improvements and simplifications for the small cost of making Interner::intern
slightly less flexible, so I will go ahead and merge this.
@@ -5,7 +5,7 @@ | |||
//! and make comparisons for any type as fast as integers. | |||
|
|||
use std::{ | |||
borrow::{Borrow, Cow}, | |||
borrow::Borrow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Interner::intern
taking a reference, we don't need to use Borrow
anymore, since it is a no-op on references. I will push a commit fixing that after merging this PR.
Leak
trait, and mergedStaticRef
into it..intern()
method to the label traits, which makes interning them more ergonomic. This removes the syntaxInternedLabel::from(&label as &dyn Label)
.