| author | |
| committer | |
| log | 2561168adbe642287c1eccd73fc29576ff0216f3 |
| tree | fb519eae876e4e4750283afc88b6eda1ca7203d2 |
| parent | 88634f0481fb1bd78f8d018b76cab6590691c8a9 |
No functional changes, remove some dead code.2 files changed, 4 insertions(+), 10 deletions(-)
lib/std/dwarf.zig+2-8| ... | ... | @@ -413,10 +413,7 @@ pub const DwarfInfo = struct { |
| 413 | 413 | var this_unit_offset: u64 = 0; |
| 414 | 414 | |
| 415 | 415 | while (this_unit_offset < try seekable.getEndPos()) { |
| 416 | seekable.seekTo(this_unit_offset) catch |err| switch (err) { | |
| 417 | error.EndOfStream => unreachable, | |
| 418 | else => return err, | |
| 419 | }; | |
| 416 | try seekable.seekTo(this_unit_offset); | |
| 420 | 417 | |
| 421 | 418 | var is_64: bool = undefined; |
| 422 | 419 | const unit_length = try readUnitLength(in, di.endian, &is_64); |
| ... | ... | @@ -520,10 +517,7 @@ pub const DwarfInfo = struct { |
| 520 | 517 | var this_unit_offset: u64 = 0; |
| 521 | 518 | |
| 522 | 519 | while (this_unit_offset < try seekable.getEndPos()) { |
| 523 | seekable.seekTo(this_unit_offset) catch |err| switch (err) { | |
| 524 | error.EndOfStream => unreachable, | |
| 525 | else => return err, | |
| 526 | }; | |
| 520 | try seekable.seekTo(this_unit_offset); | |
| 527 | 521 | |
| 528 | 522 | var is_64: bool = undefined; |
| 529 | 523 | const unit_length = try readUnitLength(in, di.endian, &is_64); |
test/stage1/behavior/union.zig+2-2| ... | ... | @@ -742,7 +742,7 @@ test "@unionInit on union w/ tag but no fields" { |
| 742 | 742 | const Data = union(Type) { |
| 743 | 743 | no_op: void, |
| 744 | 744 | |
| 745 | pub fn decode(buf: []const u8) !Data { | |
| 745 | pub fn decode(buf: []const u8) Data { | |
| 746 | 746 | return @unionInit(Data, "no_op", {}); |
| 747 | 747 | } |
| 748 | 748 | }; |
| ... | ... | @@ -753,7 +753,7 @@ test "@unionInit on union w/ tag but no fields" { |
| 753 | 753 | |
| 754 | 754 | fn doTheTest() void { |
| 755 | 755 | var data: Data = .{ .no_op = .{} }; |
| 756 | var o = try Data.decode(&[_]u8{}); | |
| 756 | var o = Data.decode(&[_]u8{}); | |
| 757 | 757 | expectEqual(Type.no_op, o); |
| 758 | 758 | } |
| 759 | 759 | }; |