-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
remove .slice()
and .constSlice()
from std.BoundedArray
in lieu of .items()
#24007
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
base: master
Are you sure you want to change the base?
remove .slice()
and .constSlice()
from std.BoundedArray
in lieu of .items()
#24007
Conversation
I wouldn’t mark this as closing the issue because it doesn’t rename |
Oh I missed that, I'll make that change |
std.BoundedArray.constSlice()
.slice()
and .constSlice()
from std.BoundedArray
in lieu of .items()
This PR might be a good time to change the way switch (@TypeOf(&self.buffer)) {
*align(alignment.toByteUnits()) [buffer_capacity]T => []align(alignment.toByteUnits()) T,
*align(alignment.toByteUnits()) const [buffer_capacity]T => []align(alignment.toByteUnits()) const T,
else => unreachable,
} is needlessly long, and quite hard to understand at first glance (especially if you don't know that receiver arguments in an switch (@TypeOf(self)) {
*Self => []align(alignment.toByteUnits()) T,
*const Self => []align(alignment.toByteUnits()) const T,
else => @compileError("Bad type"),
} It does mean that the method will no longer cope with over-aligned arguments, but I don't think it's ever something that'll be encountered in practice... |
Sure I can make that change. I'll update that |
In keeping with the general deprecation strategy used by the project, |
It would be nicest to keep |
closes #24003