-
Notifications
You must be signed in to change notification settings - Fork 8
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
Multiple as_mut
implementations prevent automatic type resolution
#48
Comments
Oh, I wasn't aware of this change. Could you please create a PR to fix it? |
I'd like to add this fix (with tests) before releasing a new version. |
Thinking about this, I'm honestly not sure if there's a simple and accessible solution to this. The So the only option would be to add a different function that just turns So if 99% of people looking at the API are just going to use a builder or write The only place where this doesn't work so easily is when storing the ruleset on a struct and trying to call |
Currently
RulesetCreated
has the following twoas_mut
implementations:I believe the
CompatLevel
one is new, which causes this previously working code to fail now:This can be easily changed by changing it to
(&mut landlock)
, but I believe the purpose of thisas_mut
call was to make non-builder usecase like this easier and with the latest Landlock git version that purpose isn't really working out anymore.This can be easily fixed by changing one or both of these impls to use a non-trait method instead (could even leave the trait impl too if that's necessary). It's not a massive deal but I was just curious if this regression is something you were aware of.
The text was updated successfully, but these errors were encountered: