-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conform to borrowing convention from std
#4
Comments
I think this might not actually be possible, because Compare:
And we would need to be able to pass a I'm closing this for now. If someone else points out that it's actually possible somehow then I'll re-open it. But it should be backward compatible, so I'm no longer treating it as a 1.0-blocker just for completeness reasons. |
On second thoughts, this limitation only exists because of my current internal representation (and even with it I think I could work around it), so I'm going to re-open this. I'm thinking of trying a different internal representation anyway, so we'll see if that goes anywhere. |
My attempts at implementing impl<T: ?Sized> Borrow<T> for T { ... } I could hack around it on nightly using negative impls or specialization, but I haven't found any way to get around it on stable. I think I'll just let this sit for now and come back to it when one of those is stabilized, unless someone else comes up with a clever workaround in the meantime. :) |
BTreeMap has signatures like...
Using
Borrow
inRangeMap
andRangeSet
would be better than the plain borrows it has now.The text was updated successfully, but these errors were encountered: