aboutsummaryrefslogtreecommitdiffstats
path: root/nihil/read_file.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil/read_file.ccm')
-rw-r--r--nihil/read_file.ccm5
1 files changed, 3 insertions, 2 deletions
diff --git a/nihil/read_file.ccm b/nihil/read_file.ccm
index fd26d8d..5f332fd 100644
--- a/nihil/read_file.ccm
+++ b/nihil/read_file.ccm
@@ -16,6 +16,7 @@ module;
export module nihil:read_file;
+import :error;
import :fd;
import :open_file;
@@ -26,9 +27,9 @@ namespace nihil {
*/
export auto read_file(std::filesystem::path const &filename,
std::output_iterator<char> auto &&iter)
- -> std::expected<void, std::error_code>
+ -> std::expected<void, error>
{
- auto do_write = [&](fd &&file) -> std::expected<void, std::error_code>
+ auto do_write = [&](fd &&file) -> std::expected<void, error>
{
auto constexpr bufsize = std::size_t{1024};
auto buffer = std::array<char, bufsize>{};