| ... | @@ -28,7 +28,6 @@ pub const Buffer = struct { | ... | @@ -28,7 +28,6 @@ pub const Buffer = struct { |
| 28 | /// Must deinitialize with deinit. | 28 | /// Must deinitialize with deinit. |
| 29 | /// None of the other operations are valid until you do one of these: | 29 | /// None of the other operations are valid until you do one of these: |
| 30 | /// * ::replaceContents | 30 | /// * ::replaceContents |
| 31 | /// * ::replaceContentsBuffer | | |
| 32 | /// * ::resize | 31 | /// * ::resize |
| 33 | pub fn initNull(allocator: *Allocator) Buffer { | 32 | pub fn initNull(allocator: *Allocator) Buffer { |
| 34 | return Buffer{ .list = ArrayList(u8).init(allocator) }; | 33 | return Buffer{ .list = ArrayList(u8).init(allocator) }; |
| ... | @@ -116,7 +115,7 @@ pub const Buffer = struct { | ... | @@ -116,7 +115,7 @@ pub const Buffer = struct { |
| 116 | return mem.eql(u8, self.list.items[start..l], m); | 115 | return mem.eql(u8, self.list.items[start..l], m); |
| 117 | } | 116 | } |
| 118 | | 117 | |
| 119 | pub fn replaceContents(self: *const Buffer, m: []const u8) !void { | 118 | pub fn replaceContents(self: *Buffer, m: []const u8) !void { |
| 120 | try self.resize(m.len); | 119 | try self.resize(m.len); |
| 121 | mem.copy(u8, self.list.toSlice(), m); | 120 | mem.copy(u8, self.list.toSlice(), m); |
| 122 | } | 121 | } |