summaryrefslogtreecommitdiff
path: root/src/line.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/line.hh')
-rw-r--r--src/line.hh11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/line.hh b/src/line.hh
index 5ce42dd..a8eeea8 100644
--- a/src/line.hh
+++ b/src/line.hh
@@ -11,20 +11,13 @@
namespace line {
-struct ReadError {
- bool eof;
- std::optional<io::ReadError> io_error;
-
- ReadError();
- explicit ReadError(io::ReadError error);
-};
-
class Reader {
public:
virtual ~Reader() = default;
// Returned view is only valid until next call to read.
- [[nodiscard]] virtual std::expected<std::string_view, ReadError> read() = 0;
+ [[nodiscard]]
+ virtual std::expected<std::string_view, io::ReadError> read() = 0;
// Starts at zero. Returns next line.
// So, before first read it is zero, after first read it is one.
[[nodiscard]] virtual uint64_t number() const = 0;