Ryan Liptak
328ae41468
Reader.peekDelimiterInclusive: Fix handling of stream implementations that return 0
...
Previously, the logic in peekDelimiterInclusive (when the delimiter was not found in the existing buffer) used the `n` returned from `r.vtable.stream` as the length of the slice to check, but it's valid for `vtable.stream` implementations to return 0 if they wrote to the buffer instead of `w`. In that scenario, the `indexOfScalarPos` would be given a 0-length slice so it would never be able to find the delimiter.
This commit changes the logic to assume that `r.vtable.stream` can both:
- return 0, and
- modify seek/end (i.e. it's also valid for a `vtable.stream` implementation to rebase)
Also introduces `std.testing.ReaderIndirect` which helps in being able to test against Reader implementations that return 0 from `stream`/`readVec`
Fixes #25428
2025-10-08 16:42:55 -07:00
..
2025-09-30 13:44:51 +01:00
2025-08-25 16:15:17 +02:00
2025-10-04 11:46:20 +02:00
2025-09-30 18:28:47 -07:00
2025-10-04 02:31:02 +00:00
2025-10-08 06:29:28 +02:00
2025-09-30 13:44:51 +01:00
2025-07-07 22:43:51 -07:00
2025-10-03 16:29:09 -07:00
2025-09-18 22:39:33 -07:00
2025-09-30 13:44:54 +01:00
2025-10-06 06:54:52 +02:00
2025-10-08 16:42:55 -07:00
2025-09-21 04:55:39 -07:00
2025-09-18 12:42:24 +02:00
2025-09-03 21:46:01 -07:00
2025-04-13 02:20:32 -04:00
2025-09-15 10:45:35 +01:00
2025-10-07 16:47:57 +02:00
2025-09-22 01:37:32 +02:00
2025-09-24 03:12:28 +02:00
2025-09-18 22:39:33 -07:00
2025-09-17 19:54:15 -07:00
2025-08-29 17:14:26 -07:00
2025-09-18 12:42:24 +02:00
2025-09-30 13:44:54 +01:00
2025-07-11 08:17:43 +02:00
2025-03-08 14:25:28 -05:00
2025-09-18 22:39:33 -07:00
2025-07-11 08:17:43 +02:00
2025-10-07 07:49:54 -04:00
2025-09-20 18:33:00 -07:00
2025-10-02 17:44:52 -04:00
2025-09-20 14:34:18 -07:00
2025-08-31 12:49:18 -07:00
2025-08-25 16:15:17 +02:00
2025-08-28 18:30:57 -07:00
2025-07-01 23:03:15 +02:00
2025-08-11 15:52:49 -07:00
2025-10-08 11:50:51 +01:00
2025-09-30 13:44:51 +01:00
2025-10-03 22:19:25 +01:00
2025-10-03 18:26:05 -07:00
2025-07-31 22:10:11 -07:00
2025-09-17 20:05:23 -07:00
2025-10-07 16:47:57 +02:00
2025-09-20 14:34:18 -07:00
2025-04-03 15:57:35 -07:00
2024-08-22 08:44:08 +02:00
2025-09-30 13:44:53 +01:00
2025-09-30 13:44:53 +01:00
2025-07-31 22:10:22 +01:00
2025-09-19 05:02:22 +00:00
2025-09-19 05:02:22 +00:00
2025-05-21 13:01:21 +03:30
2025-09-11 00:18:37 -07:00
2025-07-31 22:10:11 -07:00
2025-10-02 17:44:52 -04:00
2025-08-17 14:42:57 +02:00
2025-08-29 17:14:26 -07:00
2025-08-29 17:14:26 -07:00
2025-08-29 17:14:26 -07:00
2025-09-18 22:39:33 -07:00
2025-09-30 13:44:51 +01:00
2025-08-30 06:36:41 +02:00
2025-10-07 09:32:13 -07:00
2025-09-20 18:33:00 -07:00
2025-09-20 14:34:18 -07:00
2025-09-15 10:45:35 +01:00
2024-08-27 00:44:35 +01:00
2025-09-19 05:02:22 +00:00
2025-08-29 17:14:26 -07:00
2025-09-22 18:36:47 +02:00
2025-09-30 13:44:55 +01:00
2025-08-11 15:52:49 -07:00
2025-02-01 19:02:39 +01:00
2025-08-29 17:14:26 -07:00
2025-09-20 18:33:00 -07:00
2025-02-03 17:07:28 -08:00
2025-08-29 17:14:26 -07:00
2025-09-19 04:01:08 +02:00
2025-04-03 14:55:04 -07:00
2024-09-23 13:03:06 -07:00
2025-09-30 13:44:54 +01:00
2025-09-30 13:44:55 +01:00
2025-07-22 09:41:44 -07:00
2025-10-06 01:28:56 +02:00
2025-10-08 16:42:55 -07:00
2025-09-30 13:44:51 +01:00
2025-07-12 17:18:53 +00:00
2025-08-11 15:52:49 -07:00
2025-08-28 18:30:57 -07:00
2025-08-31 12:49:18 -07:00
2025-08-31 12:49:18 -07:00
2025-07-16 10:27:39 -07:00
2025-01-15 15:11:36 -08:00
2025-09-24 20:01:18 -07:00
2025-08-29 17:14:26 -07:00
2025-08-15 23:35:16 +02:00