| 333 | } |
| 334 | |
| 335 | Result<void, Error> StdOutputStream::flush_stream() { |
| 336 | if (stream_ == nullptr) { |
| 337 | return Unexpected(Error::io_error("output stream is null")); |
| 338 | } |
| 339 | stream_->flush(); |
| 340 | if (!(*stream_)) { |
| 341 | return Unexpected(Error::io_error("failed to flush output stream")); |
| 342 | } |
| 343 | return Result<void, Error>(); |
| 344 | } |
| 345 | |
| 346 | } // namespace fory |
nothing calls this directly
no test coverage detected