Skip to content

Commit 8e44b7e

Browse files
AlnisMmeta-codesync[bot]
authored andcommitted
fix fmt::format placeholder mismatches
Summary: fix formatting issues Reviewed By: rlyerly Differential Revision: D105208049 fbshipit-source-id: 3f625a8e55906c88256397684c200ba8368b7b35
1 parent f0a9d21 commit 8e44b7e

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

cachelib/allocator/tests/AccessTypeTest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct AccessTypeTest : public SlabAllocatorTestBase {
6060
void decRef() noexcept { refcount_--; }
6161

6262
std::string toString() const {
63-
return fmt::format(" key = {}, ref = {}, accessible = ", key_,
63+
return fmt::format(" key = {}, ref = {}, accessible = {}", key_,
6464
refcount_.load(), accessible_);
6565
}
6666

cachelib/allocator/tests/BaseAllocatorTest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6655,7 +6655,7 @@ class BaseAllocatorTest : public AllocatorTest<AllocatorT> {
66556655
if (name == "stat1") {
66566656
EXPECT_EQ(11, value);
66576657
seen++;
6658-
} else if (name == fmt::format("stat2.60")) {
6658+
} else if (name == "stat2.60") {
66596659
EXPECT_EQ(22, value);
66606660
seen++;
66616661
}
@@ -6669,7 +6669,7 @@ class BaseAllocatorTest : public AllocatorTest<AllocatorT> {
66696669
if (name == "stat1") {
66706670
EXPECT_EQ(11, value);
66716671
seen++;
6672-
} else if (name == fmt::format("stat2.60")) {
6672+
} else if (name == "stat2.60") {
66736673
EXPECT_EQ(44, value);
66746674
seen++;
66756675
}

cachelib/navy/common/Device.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,17 @@ class Device {
106106
encryptor_{std::move(encryptor)} {
107107
if (ioAlignSize == 0) {
108108
throw std::invalid_argument(
109-
fmt::format("Invalid ioAlignSize {}", ioAlignSize, size));
109+
fmt::format("Invalid ioAlignSize {}", ioAlignSize));
110110
}
111111
if (encryptor_ && encryptor_->encryptionBlockSize() != ioAlignSize) {
112112
throw std::invalid_argument(
113113
fmt::format("Invalid ioAlignSize {} encryption block size {}",
114114
ioAlignSize, encryptor_->encryptionBlockSize()));
115115
}
116116
if (maxWriteSize_ % ioAlignmentSize_ != 0) {
117-
throw std::invalid_argument(fmt::format(
118-
"Invalid max write size {} ioAlignSize {}", maxWriteSize_, size));
117+
throw std::invalid_argument(
118+
fmt::format("Invalid max write size {} ioAlignSize {}", maxWriteSize_,
119+
ioAlignmentSize_));
119120
}
120121
if (maxIOSize_ % ioAlignmentSize_ != 0) {
121122
throw std::invalid_argument(

0 commit comments

Comments
 (0)