From d091dc78154d1c6341251f1ed13bfe3b33f10773 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Sep 2025 00:05:42 +0200 Subject: uio: Remove unnecessary wrappers --- src/uio.cc | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/uio.cc') diff --git a/src/uio.cc b/src/uio.cc index 475d793..e82e435 100644 --- a/src/uio.cc +++ b/src/uio.cc @@ -572,22 +572,6 @@ std::unique_ptr open(std::unique_ptr reader, std::unreachable(); } -std::expected, io::OpenError> open( - const std::string& file_path, u::ReaderConfig config) { - auto ret = io::open(file_path); - if (ret.has_value()) - return open(std::move(ret.value()), config); - return std::unexpected(ret.error()); -} - -std::expected, io::OpenError> openat( - int dirfd, const std::string& file_path, u::ReaderConfig config) { - auto ret = io::openat(dirfd, file_path); - if (ret.has_value()) - return open(std::move(ret.value()), config); - return std::unexpected(ret.error()); -} - } // namespace u8 namespace u16 { @@ -675,20 +659,4 @@ std::unique_ptr open(std::unique_ptr reader, std::unreachable(); } -std::expected, io::OpenError> open( - const std::string& file_path, u::ReaderConfig config) { - auto ret = io::open(file_path); - if (ret.has_value()) - return open(std::move(ret.value()), config); - return std::unexpected(ret.error()); -} - -std::expected, io::OpenError> openat( - int dirfd, const std::string& file_path, u::ReaderConfig config) { - auto ret = io::openat(dirfd, file_path); - if (ret.has_value()) - return open(std::move(ret.value()), config); - return std::unexpected(ret.error()); -} - } // namespace u16 -- cgit v1.3