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
A way to avoid the need for AccessConvert
?
#77
Comments
AccessConvert
AccessConvert
?
I think I was trying to come up with something like that back then. I don't know why it failed for me, maybe there were some kind of conflicting implementations. Would you try making it into a PR (maybe without the docs first) to see if it passes all the tests, including on the old but still supported platforms? |
I mean, one might think it is because the blanket impl gets more general with the added use arc_swap::access::Access;
trait Foo {}
impl Access<()> for Box<dyn Foo> {
type Guard = &'static ();
fn load(&self) -> &'static () {
&()
}
} without complaining about alleged “overlap”, despite the fact that the |
Looks like something like
could avoid the need for the AccessConvert wrapper, right?
Edit: Ah, the actual
AccessConvert
is somewhat more general, as it allows – say –Box<dyn Foo>
for a traitFoo: DynAccess
, too. Still, this change could make many use cases ofAccessConvert
unnecessary, I suppose; and it’s not even a breaking change. (It should e.g. be documented though, if this becomes a PR.)The text was updated successfully, but these errors were encountered: