From d0e3d20af8f657090112c078d4f5d39ed7cbbd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ka=C4=9Fan=20Can=20=C5=9Eit?= Date: Thu, 30 Apr 2026 06:50:56 +0300 Subject: [PATCH] chore(IWYU):Remove redundant includes (#4758) --- include/fmt/format-inl.h | 5 +---- src/os.cc | 3 ++- test/format-impl-test.cc | 1 - test/posix-mock-test.cc | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 3e04ddf5..11a3cee7 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -18,10 +18,7 @@ extern "C" void __tsan_release(void*); # include # include // errno -# include -# include -# include -# include // std::bad_alloc +# include // std::bad_alloc #endif #if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE) diff --git a/src/os.cc b/src/os.cc index 409863a9..0e1d582a 100644 --- a/src/os.cc +++ b/src/os.cc @@ -13,7 +13,6 @@ #include "fmt/os.h" #ifndef FMT_MODULE -# include # if FMT_USE_FCNTL # include @@ -35,6 +34,8 @@ # ifdef _WIN32 # include + +# include // CHAR_BIT # endif #endif diff --git a/test/format-impl-test.cc b/test/format-impl-test.cc index 4259add3..3c0a7d8b 100644 --- a/test/format-impl-test.cc +++ b/test/format-impl-test.cc @@ -13,7 +13,6 @@ #include "fmt/format.h" #include "gmock/gmock.h" -#include "util.h" using fmt::detail::bigint; using fmt::detail::fp; diff --git a/test/posix-mock-test.cc b/test/posix-mock-test.cc index bcd330d4..67d032c5 100644 --- a/test/posix-mock-test.cc +++ b/test/posix-mock-test.cc @@ -15,19 +15,19 @@ #include #include -#include #include #include "../src/os.cc" #ifdef _WIN32 # include + +# include // UINT_MAX # undef max #endif #include "gmock/gmock.h" #include "gtest-extra.h" -#include "util.h" using fmt::buffered_file;