| ... | ... | @@ -544,6 +544,11 @@ pub fn AlignedManaged(comptime T: type, comptime alignment: ?mem.Alignment) type |
| 544 | 544 | return self.allocatedSlice()[self.items.len..]; |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | /// Deprecated |
| 548 | pub fn getLast(self: Self) T { |
| 549 | return self.items[self.items.len - 1]; |
| 550 | } |
| 551 | |
| 547 | 552 | /// Deprecated in favor of `last` |
| 548 | 553 | pub const getLastOrNull = last; |
| 549 | 554 | |
| ... | ... | @@ -1399,6 +1404,14 @@ pub fn Aligned(comptime T: type, comptime alignment: ?mem.Alignment) type { |
| 1399 | 1404 | return self.allocatedSlice()[self.items.len..]; |
| 1400 | 1405 | } |
| 1401 | 1406 | |
| 1407 | /// Deprecated |
| 1408 | pub fn getLast(self: Self) T { |
| 1409 | return self.items[self.items.len - 1]; |
| 1410 | } |
| 1411 | |
| 1412 | /// Deprecated in favor of `last` |
| 1413 | pub const getLastOrNull = last; |
| 1414 | |
| 1402 | 1415 | /// Returns the last element from the list, or `null` if the list is |
| 1403 | 1416 | /// empty. |
| 1404 | 1417 | pub fn last(self: Self) ?T { |