authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-09 19:06:35-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-09 20:01:15-07:00
log10d6db5d7d1fb62ee2915a7ad2c7feb771ea3bbb
tree541001bffb668f3ba8939739e766d208133b71be
parentaa1bdb43e01318a7a2724a44e371ca575794722d

std.io.Writer: remove some unimplemented functions

YAGNI

1 files changed, 0 insertions(+), 38 deletions(-)

lib/std/io/Writer.zig-38
......@@ -181,20 +181,6 @@ pub fn writeSplat(w: *Writer, data: []const []const u8, splat: usize) Error!usiz
181181 return count;
182182}
183183
184/// Equivalent to `writeSplat` but writes at most `limit` bytes.
185pub fn writeSplatLimit(
186 w: *Writer,
187 data: []const []const u8,
188 splat: usize,
189 limit: Limit,
190) Error!usize {
191 _ = w;
192 _ = data;
193 _ = splat;
194 _ = limit;
195 @panic("TODO");
196}
197
198184/// Returns how many bytes were consumed from `header` and `data`.
199185pub fn writeSplatHeader(
200186 w: *Writer,
......@@ -242,22 +228,6 @@ test "writeSplatHeader splatting avoids buffer aliasing temptation" {
242228 );
243229}
244230
245/// Equivalent to `writeSplatHeader` but writes at most `limit` bytes.
246pub fn writeSplatHeaderLimit(
247 w: *Writer,
248 header: []const u8,
249 data: []const []const u8,
250 splat: usize,
251 limit: Limit,
252) Error!usize {
253 _ = w;
254 _ = header;
255 _ = data;
256 _ = splat;
257 _ = limit;
258 @panic("TODO");
259}
260
261231/// Drains all remaining buffered data.
262232pub fn flush(w: *Writer) Error!void {
263233 return w.vtable.flush(w);
......@@ -827,14 +797,6 @@ pub inline fn writeSliceEndian(
827797 }
828798}
829799
830/// Asserts that the buffer storage capacity is at least enough to store `@sizeOf(Elem)`
831pub fn writeSliceSwap(w: *Writer, Elem: type, slice: []const Elem) Error!void {
832 // copy to storage first, then swap in place
833 _ = w;
834 _ = slice;
835 @panic("TODO");
836}
837
838800/// Unlike `writeSplat` and `writeVec`, this function will call into `VTable`
839801/// even if there is enough buffer capacity for the file contents.
840802///