Skip to content

Commit 6886493

Browse files
auto-revert-processorEvergreen Agent
authored andcommitted
Revert "SERVER-81512 Removed using namespace fmt::literals from global namespace"
This reverts commit 3f63faa.
1 parent 458fce7 commit 6886493

File tree

65 files changed

+15
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+15
-65
lines changed

src/mongo/db/auth/authz_manager_external_state_local.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474

7575

7676
namespace mongo {
77-
using namespace fmt::literals;
7877

7978
using std::vector;
8079
using ResolveRoleOption = AuthzManagerExternalStateLocal::ResolveRoleOption;

src/mongo/db/auth/authz_manager_external_state_mock.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void addRoleNameObjectsToArrayElement(mutablebson::Element array, RoleNameIterat
9090
void addPrivilegeObjectsOrWarningsToArrayElement(mutablebson::Element privilegesElement,
9191
mutablebson::Element warningsElement,
9292
const PrivilegeVector& privileges) {
93-
using namespace fmt::literals;
9493
for (const auto& privilege : privileges) {
9594
try {
9695
fassert(17178, privilegesElement.appendObject("", privilege.toBSON()));

src/mongo/db/auth/privilege.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#include "mongo/util/assert_util.h"
5151

5252
namespace mongo {
53-
using namespace fmt::literals;
5453
namespace {
5554
void uassertNoConflict(StringData resource, StringData found, bool cond) {
5655
uassert(

src/mongo/db/auth/resource_pattern.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ class ResourcePattern {
149149
* "<dbName>.system.buckets.<collectionName>"
150150
*/
151151
static ResourcePattern forExactSystemBucketsCollection(const NamespaceString& nss) {
152-
using namespace fmt::literals;
153152
uassert(ErrorCodes::InvalidNamespace,
154153
"Invalid namespace '{}.system.buckets.{}'"_format(
155154
nss.dbName().toStringForErrorMsg(), nss.coll()),

src/mongo/db/auth/validated_tenancy_scope.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969

7070
namespace mongo::auth {
7171
namespace {
72-
using namespace fmt::literals;
73-
7472
const auto validatedTenancyScopeDecoration =
7573
OperationContext::declareDecoration<boost::optional<ValidatedTenancyScope>>();
7674

src/mongo/db/basic_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#include "mongo/bson/bsonobjbuilder.h"
3939
#include "mongo/stdx/variant.h"
4040

41+
using namespace fmt::literals;
42+
4143
namespace mongo {
4244

4345
/**

src/mongo/db/catalog/drop_collection.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,6 @@ Status isDroppableCollection(OperationContext* opCtx, const NamespaceString& nss
738738
nss.isSystemDotJavascript() || nss.isSystemStatsCollection();
739739
};
740740

741-
using namespace fmt::literals;
742741
if (nss.isSystemDotProfile()) {
743742
if (CollectionCatalog::get(opCtx)->getDatabaseProfileLevel(nss.dbName()) != 0)
744743
return Status(ErrorCodes::IllegalOperation,

src/mongo/db/catalog/virtual_collection_options.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ struct ExternalDataSourceMetadata {
4747
StorageTypeEnum storageTypeEnum,
4848
FileTypeEnum fileTypeEnum)
4949
: url(urlStr), storageType(storageTypeEnum), fileType(fileTypeEnum) {
50-
using namespace fmt::literals;
5150
uassert(6968500,
5251
"File url must start with {}"_format(kUrlProtocolFile),
5352
urlStr.startsWith(kUrlProtocolFile));

src/mongo/db/cluster_transaction_api.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ StringMap<std::string> clusterCommandTranslations = {
5959
{"update", "clusterUpdate"}};
6060

6161
BSONObj replaceCommandNameWithClusterCommandName(BSONObj cmdObj) {
62-
using namespace fmt::literals;
6362
auto cmdName = cmdObj.firstElement().fieldNameStringData();
6463
auto newNameIt = clusterCommandTranslations.find(cmdName);
6564
uassert(6349501,

src/mongo/db/commands/mr_common.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@
8888
namespace mongo::map_reduce_common {
8989

9090
namespace {
91+
9192
using namespace std::string_literals;
9293

9394
Status interpretTranslationError(DBException* ex, const MapReduceCommandRequest& parsedMr) {
94-
using namespace fmt::literals;
95-
9695
auto status = ex->toStatus();
9796
auto outOptions = parsedMr.getOutOptions();
9897
const auto outNss = outOptions.getDatabaseName()

0 commit comments

Comments
 (0)