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...@@ -181,20 +181,6 @@ pub fn writeSplat(w: *Writer, data: []const []const u8, splat: usize) Error!usiz
181 return count;181 return count;
182}182}
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
198/// Returns how many bytes were consumed from `header` and `data`.184/// Returns how many bytes were consumed from `header` and `data`.
199pub fn writeSplatHeader(185pub fn writeSplatHeader(
200 w: *Writer,186 w: *Writer,
...@@ -242,22 +228,6 @@ test "writeSplatHeader splatting avoids buffer aliasing temptation" {...@@ -242,22 +228,6 @@ test "writeSplatHeader splatting avoids buffer aliasing temptation" {
242 );228 );
243}229}
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
261/// Drains all remaining buffered data.231/// Drains all remaining buffered data.
262pub fn flush(w: *Writer) Error!void {232pub fn flush(w: *Writer) Error!void {
263 return w.vtable.flush(w);233 return w.vtable.flush(w);
...@@ -827,14 +797,6 @@ pub inline fn writeSliceEndian(...@@ -827,14 +797,6 @@ pub inline fn writeSliceEndian(
827 }797 }
828}798}
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
838/// Unlike `writeSplat` and `writeVec`, this function will call into `VTable`800/// Unlike `writeSplat` and `writeVec`, this function will call into `VTable`
839/// even if there is enough buffer capacity for the file contents.801/// even if there is enough buffer capacity for the file contents.
840///802///