Enable more readability-redundant checks (#143963)

They are helpful to simplifying code.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143963
Approved by: https://github.com/albanD
This commit is contained in:
cyy
2024-12-30 14:49:33 +00:00
committed by PyTorch MergeBot
parent 438698b20b
commit dca443835e
36 changed files with 57 additions and 74 deletions

View File

@@ -49,8 +49,8 @@ TEST(StringUtilTest, testStrWideSingleMultibyte) {
namespace test_str_wide_empty {
TEST(StringUtilTest, testStrWideEmpty) {
std::wstring s = L"";
std::string narrow = "";
std::wstring s;
std::string narrow;
EXPECT_EQ(narrow, c10::str(s));
const wchar_t* c_str = s.c_str();